abbec79791747d0d45626ebf4876831cca6e640f
[jscl.git] / tests / hash-tables.lisp
1
2 (let ((ht (make-hash-table))
3       (key "foo"))
4   (setf (gethash key ht) 10)
5   (test (null (gethash "foo" ht)))
6   (test (equal (gethash key ht) 10))
7   (setf (gethash 'foo ht) "lisp")
8   (test (string= (gethash 'foo ht) "lisp")))
9
10
11 (let ((ht (make-hash-table :test #'equal)))
12   (setf (gethash "foo" ht) 10)
13   (test (equal (gethash "foo" ht) 10)))
14
15
16