Commit 8fbe1c7d authored by pfdietz's avatar pfdietz
Browse files

Relaxed four error tests that arguably didn't reach the 'should be prepared to signal' requirements

parent 7f39a2c1
......@@ -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)
......@@ -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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment