diff options
Diffstat (limited to 'test-suite/tests/hash.test')
-rw-r--r-- | test-suite/tests/hash.test | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test-suite/tests/hash.test b/test-suite/tests/hash.test index 64d10bb38..4c21d7129 100644 --- a/test-suite/tests/hash.test +++ b/test-suite/tests/hash.test @@ -347,3 +347,15 @@ (pass-if (equal? 2 (hash-count (lambda (k v) (string? v)) table))))) + +;;; +;;; weak key hash table +;;; + +(with-test-prefix "weak key hash table" + (pass-if "hash-for-each after gc" + (let ((table (make-weak-key-hash-table))) + (hashq-set! table (list 'foo) 'bar) + (gc) + ;; Iterate over deleted weak ref without crashing. + (unspecified? (hash-for-each (lambda (key value) key) table))))) |