From 2c5f0028c8ce8e5e749e354917bdbca932cf0358 Mon Sep 17 00:00:00 2001 From: Daniel Kochmanski Date: Fri, 28 Apr 2017 22:54:15 +0200 Subject: [PATCH] hash tables: add mundane tests for sync ht we replace internal functions for get/set/rem, so we add tests which check if basic functionality still works fine. --- src/tests/normal-tests/hash-tables.lsp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/tests/normal-tests/hash-tables.lsp b/src/tests/normal-tests/hash-tables.lsp index 93e6ba4e2..d7d0d1d3e 100644 --- a/src/tests/normal-tests/hash-tables.lsp +++ b/src/tests/normal-tests/hash-tables.lsp @@ -69,4 +69,10 @@ ;;; Synchronization (test hash-tables.sync (let ((ht (make-hash-table :synchronized t))) - (is-true (ext:hash-table-synchronized-p ht)))) + (is-true (ext:hash-table-synchronized-p ht)) + (setf (gethash :foo ht) 3) + (setf (gethash :bar ht) 4) + (is (= 2 (hash-table-count ht))) + (is (= 3 (gethash :foo ht))) + (is-true (remhash :bar ht)) + (is (= 1 (hash-table-count ht)))))