34 |
(notnot-mv (typep (make-hash-table) (find-class 'hash-table))) |
(notnot-mv (typep (make-hash-table) (find-class 'hash-table))) |
35 |
t) |
t) |
36 |
|
|
|
;;; |
|
|
|
|
|
(deftest hash-table-p.1 |
|
|
(loop for e in '(nil t 1 10.0 (a b c) #(a b c) #*1011 |
|
|
#0aNIL #2a((a b)(c d)) #p"foo" |
|
|
"bar" #\a 3/5 #c(1.0 2.0)) |
|
|
when (hash-table-p e) |
|
|
collect e) |
|
|
nil) |
|
|
|
|
|
(deftest hash-table-p.2 |
|
|
(loop for e in *universe* |
|
|
for p = (typep e 'hash-table) |
|
|
for q = (hash-table-p e) |
|
|
always (if p q (not q))) |
|
|
t) |
|
|
|
|
|
(deftest hash-table-p.3 |
|
|
(let ((i 0)) |
|
|
(values (hash-table-p (incf i)) i)) |
|
|
nil 1) |
|
|
|
|
|
(deftest hash-table-p.error.1 |
|
|
(classify-error (hash-table-p)) |
|
|
program-error) |
|
|
|
|
|
(deftest hash-table-p.error.2 |
|
|
(classify-error (let ((h (make-hash-table))) (hash-table-p h nil))) |
|
|
program-error) |
|
|
|
|
37 |
|
|
38 |
|
|
39 |
|
|