From: Alexey D. <ade...@us...> - 2003-03-11 18:24:38
|
Update of /cvsroot/sbcl/sbcl/tests In directory sc8-pr-cvs1:/tmp/cvs-serv25453/tests Modified Files: hash.impure.lisp list.pure.lisp Log Message: 0.7.13.24: * [N]REVERSE and NRECONC check properness of list arguments; * [P]SXHASH always consider NIL to be a symbol. Index: hash.impure.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/hash.impure.lisp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- hash.impure.lisp 7 Nov 2002 18:08:50 -0000 1.4 +++ hash.impure.lisp 11 Mar 2003 18:24:33 -0000 1.5 @@ -223,5 +223,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) Index: list.pure.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/list.pure.lisp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- list.pure.lisp 8 Mar 2003 12:02:10 -0000 1.5 +++ list.pure.lisp 11 Mar 2003 18:24:33 -0000 1.6 @@ -101,10 +101,10 @@ args)))) (check-error (funcall (compile nil `(lambda () ,exp))) fail))))) -(dolist (test '((1 2) - ((1 2) nil (3 . 4) nil) - (nil (1 2) nil (3 . 4) nil))) - (multiple-value-bind (result error) - (ignore-errors (apply 'append test)) - (assert (null result)) - (assert (typep error 'type-error)))) +(dolist (test '((append 1 2) + (append (1 2) nil (3 . 4) nil) + (append nil (1 2) nil (3 . 4) nil) + (reverse (1 2 . 3)) + (nreverse (1 2 . 3)) + (nreconc (1 2 . 3) (4 5)))) + (assert (raises-error? (apply (first test) (copy-tree (rest test))) type-error))) |