0.8.10.27:
[sbcl.git] / tests / hash.impure.lisp
index fae5863..ee9e538 100644 (file)
        (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))))