diff --git a/ansi-tests/subsetp.lsp b/ansi-tests/subsetp.lsp index a296047f1c8ea4a90dda12be7b2841229354efa3..1f199bf01b8987f929aad80f448e6532f3601779 100644 --- a/ansi-tests/subsetp.lsp +++ b/ansi-tests/subsetp.lsp @@ -260,11 +260,15 @@ (signals-error (subsetp (list* 1 2 3) (list 1 2 3 4 5 6)) type-error) t) +;;; The next two tests previously compared against NIL, but arguably +;;; a conforming implementation is not required to signal an error +;;; in these cases, since it doesn't have to traverse the other list. + (deftest subsetp.error.13 - (check-type-error #'(lambda (x) (subsetp x nil)) #'listp) + (check-type-error #'(lambda (x) (subsetp x '(a b))) #'listp) nil) (deftest subsetp.error.14 - (check-type-error #'(lambda (x) (subsetp nil x)) #'listp) + (check-type-error #'(lambda (x) (subsetp '(a b) x)) #'listp) nil) diff --git a/ansi-tests/union.lsp b/ansi-tests/union.lsp index 0bb1fd5dec05bb4de12621fd78d04acf15292cfa..e85fa14dcc7baa9b2da74c869310836a6a45f690 100644 --- a/ansi-tests/union.lsp +++ b/ansi-tests/union.lsp @@ -415,11 +415,15 @@ (signals-error (union (list* 1 2 3) (list 4 5 6)) type-error) t) +;;; The next two tests used to check for union with NIL, but arguably +;;; that goes beyond the 'be prepared to signal an error' requirement, +;;; since a union algorithm doesn't have to traverse one argument +;;; if the other is the empty list. + (deftest union.error.13 - (check-type-error #'(lambda (x) (union x nil)) #'listp) + (check-type-error #'(lambda (x) (union x '(1 2))) #'listp) nil) (deftest union.error.14 - (check-type-error #'(lambda (x) (union nil x)) #'listp) + (check-type-error #'(lambda (x) (union '(1 2) x)) #'listp) nil) -