mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-23 04:52:42 -08:00
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.
This commit is contained in:
parent
4d9e9b07af
commit
2c5f0028c8
1 changed files with 7 additions and 1 deletions
|
|
@ -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)))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue