From 8fbe1c7d3ca5968a6c09a031657793265beb2bdd Mon Sep 17 00:00:00 2001
From: pfdietz <pfdietz@localhost>
Date: Tue, 28 Jun 2005 12:19:26 +0000
Subject: [PATCH] Relaxed four error tests that arguably didn't reach the
 'should be prepared to signal' requirements

---
 ansi-tests/subsetp.lsp |  8 ++++++--
 ansi-tests/union.lsp   | 10 +++++++---
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/ansi-tests/subsetp.lsp b/ansi-tests/subsetp.lsp
index a296047f..1f199bf0 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 0bb1fd5d..e85fa14d 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)
-
-- 
GitLab