X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Flist.pure.lisp;h=9bf32a8cee87e20787b8158c2f5650c6eb38f535;hb=60d2531e0a12daa5a43e390affe9260688b17d21;hp=3bc5349cfe779eb01ad0945a4a23e3797310bc58;hpb=1aefe68236aaf048ce602e7725ad26d130be1fd5;p=sbcl.git diff --git a/tests/list.pure.lisp b/tests/list.pure.lisp index 3bc5349..9bf32a8 100644 --- a/tests/list.pure.lisp +++ b/tests/list.pure.lisp @@ -101,7 +101,19 @@ args)))) (check-error (funcall (compile nil `(lambda () ,exp))) fail))))) -(multiple-value-bind (result error) - (ignore-errors (append 1 2)) - (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)) + (copy-alist ((1 . 2) (3 . 4) . 5)))) + (assert (raises-error? (apply (first test) (copy-tree (rest test))) + type-error))) + +;;; Bug reported by Paul Dietz: NSET-EXCLUSIVE-OR should not return +;;; extra elements, even when given "sets" contain duplications +(assert (equal (remove-duplicates (sort (nset-exclusive-or (list 1 2 1 3) + (list 4 1 3 3)) + #'<)) + '(2 4)))