X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fhash.impure.lisp;h=dfbb9c4ff4227ac360f1cf9110753ab23c622be5;hb=2253ebaef8a0a1527d2282a1c10f48c62e0d4a83;hp=fae5863b93e4583f2863367afa24f0d4fd72cdde;hpb=a3ab89c1db0dd9bfb911532ca134be16f16c4c1b;p=sbcl.git diff --git a/tests/hash.impure.lisp b/tests/hash.impure.lisp index fae5863..dfbb9c4 100644 --- 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 (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)))) @@ -236,7 +241,8 @@ ;;; 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))) @@ -244,6 +250,10 @@ (funcall (compile nil `(lambda (x) (declare (list x)) (,fun x))) + nil) + (funcall (compile nil `(lambda (x) + (declare (null x)) + (,fun x))) nil)))) ;;; success