diff --git a/tests/hash-tests.scm b/tests/hash-tests.scm index 710f08f2..79ac5d16 100644 --- a/tests/hash-tests.scm +++ b/tests/hash-tests.scm @@ -164,6 +164,14 @@ '(("cat" . black) ("dog" . white) ("elephant" . pink)) (hash-table->alist ht))) +;; Exception values - this works because the return value from the +;; primitives is a cell, and we use the cdr opcode to retrieve the +;; cell value. Thus there is no FFI issue with storing exceptions. +(let ((ht (make-hash-table))) + (hash-table-set! ht 'boom (make-exception 'my-exn-type "boom!" '() #f #f)) + (test 'my-exn-type (exception-type (hash-table-ref ht 'boom)))) + +;; stress test (test 625 (let ((ht (make-hash-table))) (do ((i 0 (+ i 1))) ((= i 1000))