From 88b09a6b60ca9ff1c998c3dadae8e9be27da85a4 Mon Sep 17 00:00:00 2001 From: Catherine Tower Date: Sun, 27 Feb 2022 15:19:01 -0800 Subject: [PATCH] Add unit test for HASH-TABLE-TEST The test ensures that there's no error when HASH-TABLE-TEST is called on a hash table with a custom equality function. The tests pass, with some caveats: - I'm only about 70% sure that FINISHES is the right test-predicate to use for something like this - The test suite would consistently fail with non-deterministic segfaults while testing the MULTIPROCESSING subtest. This could easily be due to the fact that I'm using a FreeBSD machine, and don't have access to a Linux machine at the moment -- though I'd be happy to re-run the tests when I do. The test suite completed when I commented out the MULTIPROCESSING subtest from the ASD file. I don't believe this would have any bearing on whether or not the hash table tests should pass --- src/tests/normal-tests/hash-tables.lsp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/normal-tests/hash-tables.lsp b/src/tests/normal-tests/hash-tables.lsp index 1e979040c..7e7f32e15 100644 --- a/src/tests/normal-tests/hash-tables.lsp +++ b/src/tests/normal-tests/hash-tables.lsp @@ -147,6 +147,7 @@ (signals error (gethash "foobar" ht)) (signals error (setf (gethash "foobar" ht) 15)) (finishes (remhash 3 ht)) + (finishes (hash-table-test ht)) (is (null (gethash 1 ht))) (finishes (setf (gethash 55 ht) 0)) (is (= (gethash 13 ht) 0)))))