X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fhash.impure.lisp;h=fae5863b93e4583f2863367afa24f0d4fd72cdde;hb=a64589ed34ce0298fae164476af7de14c4652909;hp=5a461ab24cfb52a402dae91eedb4cc4f3ef6525e;hpb=8e1eb3714554b8b93455895756787f6c4f63afc5;p=sbcl.git diff --git a/tests/hash.impure.lisp b/tests/hash.impure.lisp index 5a461ab..fae5863 100644 --- a/tests/hash.impure.lisp +++ b/tests/hash.impure.lisp @@ -52,7 +52,17 @@ (complex 1.5 -3/2) (complex 1.5 -1.5d0) #\x #\X #\* + + (copy-seq "foo") (copy-seq "foobar") (copy-seq "foobarbaz") + (copy-seq #*) + (copy-seq #*0) (copy-seq #*1) + (copy-seq #*00) (copy-seq #*10) + (copy-seq #*01) (copy-seq #*11) + (copy-seq #*10010) (copy-seq #*100101) (bit-not #*01101) + (make-array 6 :fill-pointer 6 + :element-type 'bit :initial-contents #*100101) + #'allocate-instance #'no-applicable-method)) (make-psxhash-extra-subtests () (list (copy-seq "") @@ -180,7 +190,8 @@ ;; that the SXHASH distribution changes, not once every time the ;; tests are run.) (dolist (i sxhash-tests) - (unless (typep (sxhash i) '(and fixnum unsigned-byte)) + (declare (notinline funcall)) + (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)) @@ -223,5 +234,17 @@ (assert (eql (gethash key read-ht) (gethash key original-ht)))))) +;;; NIL is both SYMBOL and LIST +(dolist (fun '(sxhash sb-impl::psxhash)) + (assert (= (funcall fun nil) + (funcall (compile nil `(lambda (x) + (declare (symbol x)) + (,fun x))) + nil) + (funcall (compile nil `(lambda (x) + (declare (list x)) + (,fun x))) + nil)))) + ;;; success (quit :unix-status 104)