projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
message
[sbcl.git]
/
tests
/
hash.impure.lisp
diff --git
a/tests/hash.impure.lisp
b/tests/hash.impure.lisp
index
fae5863
..
dfbb9c4
100644
(file)
--- a/
tests/hash.impure.lisp
+++ b/
tests/hash.impure.lisp
@@
-194,8
+194,13
@@
(unless (typep (funcall #'sxhash i) '(and fixnum unsigned-byte))
(error "bad SXHASH behavior for ~S" i))
(dolist (j sxhash-tests)
(unless (typep (funcall #'sxhash i) '(and fixnum unsigned-byte))
(error "bad SXHASH behavior for ~S" i))
(dolist (j sxhash-tests)
- (unless (eq (t->boolean (equal i j))
- (t->boolean (= (sxhash i) (sxhash j))))
+ (unless (or (eq (t->boolean (equal i j))
+ (t->boolean (= (sxhash i) (sxhash j))))
+ (and (typep i 'number)
+ (typep j 'number)
+ (= i j)
+ (subtypep (type-of i) (type-of j))
+ (subtypep (type-of j) (type-of i))))
;; (If you get a surprising failure here, maybe you were
;; just very unlucky; see the notes above.)
(error "bad SXHASH behavior for ~S ~S" i j))))
;; (If you get a surprising failure here, maybe you were
;; just very unlucky; see the notes above.)
(error "bad SXHASH behavior for ~S ~S" i j))))
@@
-236,7
+241,8
@@
;;; NIL is both SYMBOL and LIST
(dolist (fun '(sxhash sb-impl::psxhash))
;;; NIL is both SYMBOL and LIST
(dolist (fun '(sxhash sb-impl::psxhash))
- (assert (= (funcall fun nil)
+ (assert (= (eval `(,fun nil))
+ (funcall fun nil)
(funcall (compile nil `(lambda (x)
(declare (symbol x))
(,fun x)))
(funcall (compile nil `(lambda (x)
(declare (symbol x))
(,fun x)))
@@
-244,6
+250,10
@@
(funcall (compile nil `(lambda (x)
(declare (list x))
(,fun x)))
(funcall (compile nil `(lambda (x)
(declare (list x))
(,fun x)))
+ nil)
+ (funcall (compile nil `(lambda (x)
+ (declare (null x))
+ (,fun x)))
nil))))
;;; success
nil))))
;;; success