diff --git a/ansi-tests/adjoin.lsp b/ansi-tests/adjoin.lsp index 6d3ae5ac32687c8cd3f2974a49cf18bcec47fec0..943c100bf1528cf3df7d206f2032922bee6f4e8a 100644 --- a/ansi-tests/adjoin.lsp +++ b/ansi-tests/adjoin.lsp @@ -102,6 +102,11 @@ (adjoin 10 '(1 2 3) :test-not #'<) (1 2 3)) +(defharmless adjoin.test-and-test-not.1 + (adjoin 'a '(b c) :test #'eql :test-not #'eql)) + +(defharmless adjoin.test-and-test-not.2 + (adjoin 'a '(b c) :test-not #'eql :test #'eql)) (deftest adjoin.order.1 (let ((i 0) w x y z) @@ -148,7 +153,7 @@ (deftest adjoin.repeat-key (adjoin 'a '(b c) :test #'eq :test (complement #'eq)) - (a b c)) + (a b c)) (deftest adjoin.error.1 (classify-error (adjoin)) diff --git a/ansi-tests/ansi-aux.lsp b/ansi-tests/ansi-aux.lsp index 8a2a3300eb47694fde43490fd718ca4d56e5a9f3..ba8089321166e322e2565317b6166458c720b762 100644 --- a/ansi-tests/ansi-aux.lsp +++ b/ansi-tests/ansi-aux.lsp @@ -1476,3 +1476,16 @@ the condition to go uncaught if it cannot be classified." ;;; (when (typep (find-class 'standard-class) 'standard-class) ;;; (defclass substandard-class (standard-class) ()) ;;; (defparameter *can-define-metaclasses* t)) + +;;; Macro for testing that something is undefined but 'harmless' + +(defmacro defharmless (name form) + `(deftest ,name + (block done + (let ((*debugger-hook* #'(lambda (&rest args) + (declare (ignore args)) + (return-from done :good)))) + (handler-case + (unwind-protect (eval ',form) (return-from done :good)) + (condition () :good)))) + :good)) diff --git a/ansi-tests/assoc.lsp b/ansi-tests/assoc.lsp index c72fd354241bcb4dee6e8b2524876b68547cf937..3b296c76625ace8b30f97842943ff3f9eda120d2 100644 --- a/ansi-tests/assoc.lsp +++ b/ansi-tests/assoc.lsp @@ -150,6 +150,14 @@ (assoc 10 '((1 a) (5 b) (8 c) (11 d) (12 e)) :test-not #'>=) (11 d)) +;;; :test & :test-not together are harmless + +(defharmless assoc.test-and-test-not.1 + (assoc 'a '((a . 1) (b . 2)) :test #'eql :test-not #'eql)) + +(defharmless assoc.test-and-test-not.2 + (assoc 'a '((a . 1) (b . 2)) :test-not #'eql :test #'eql)) + ;;; Order of argument evaluation (deftest assoc.order.1 diff --git a/ansi-tests/count.lsp b/ansi-tests/count.lsp index 057d8249f151c6ca9b099ae67aca56320d1bbe10..61fc1ab221fdfd6a50474bae976e0388e882e6c8 100644 --- a/ansi-tests/count.lsp +++ b/ansi-tests/count.lsp @@ -87,6 +87,12 @@ (count 10 '(1 11 2 4 14 5 18 6 7) :test-not #'>=) 3) +(defharmless count-list.test-and-test-not.1 + (count 0 '(0 1 2 0 1 2 3 0 1) :test #'eql :test-not #'eql)) + +(defharmless count-list.test-and-test-not.2 + (count 0 '(0 1 2 0 1 2 3 0 1) :test-not #'eql :test #'eql)) + ;;; On vectors (deftest count-vector.1 @@ -171,6 +177,12 @@ (count 10 #(1 11 2 4 14 5 18 6 7) :test-not #'>=) 3) +(defharmless count-vector.test-and-test-not.1 + (count 0 #(0 1 2 0 1 2 3 0 1) :test #'eql :test-not #'eql)) + +(defharmless count-vector.test-and-test-not.2 + (count 0 #(0 1 2 0 1 2 3 0 1) :test-not #'eql :test #'eql)) + ;;; Non-simple vectors (deftest count-filled-vector.1 @@ -408,6 +420,12 @@ (count 1 #*00001100100 :test-not #'>) 3) +(defharmless count-bit-vector.test-and-test-not.1 + (count 0 #*0011010101100010000 :test #'eql :test-not #'eql)) + +(defharmless count-bit-vector.test-and-test-not.2 + (count 0 #*0011010101100010000 :test-not #'eql :test #'eql)) + ;;; Tests on strings (deftest count-string.1 @@ -517,6 +535,12 @@ (count #\1 "00001100100" :test-not #'char>) 3) +(defharmless count-string.test-and-test-not.1 + (count #\0 "0011010101100010000" :test #'eql :test-not #'eql)) + +(defharmless count-string.test-and-test-not.2 + (count #\0 "0011010101100010000" :test-not #'eql :test #'eql)) + ;;; Argument order tests (deftest count.order.1 diff --git a/ansi-tests/find.lsp b/ansi-tests/find.lsp index e8652e872567125fdef8a452813203f3d7351c61..b8fac5ac49ecec46a0b7a7e7393b63a510a7a743 100644 --- a/ansi-tests/find.lsp +++ b/ansi-tests/find.lsp @@ -781,6 +781,32 @@ (find #\k "abcdmnop" :test-not #'char>=) #\m) +;;; Test & test not + +(defharmless find-list.test-and-test-not.1 + (find 'b '(a b c) :test #'eql :test-not #'eql)) + +(defharmless find-list.test-and-test-not.2 + (find 'b '(a b c) :test-not #'eql :test #'eql)) + +(defharmless find-vector.test-and-test-not.1 + (find 'b #(a b c) :test #'eql :test-not #'eql)) + +(defharmless find-vector.test-and-test-not.2 + (find 'b #(a b c) :test-not #'eql :test #'eql)) + +(defharmless find-string.test-and-test-not.1 + (find #\b "abc" :test #'eql :test-not #'eql)) + +(defharmless find-string.test-and-test-not.2 + (find #\b "abc" :test-not #'eql :test #'eql)) + +(defharmless find-bit-string.test-and-test-not.1 + (find 0 #*110110 :test #'eql :test-not #'eql)) + +(defharmless find-bit-string.test-and-test-not.2 + (find 0 #*110110 :test-not #'eql :test #'eql)) + ;;; Keyword tests (deftest find.allow-other-keys.1 diff --git a/ansi-tests/intersection.lsp b/ansi-tests/intersection.lsp index f4354f5a6052e8ea9672e8d19c4b4a3d46bb3d64..8ff92c6c8238d0f0a8880069cad98accfcdaaa3d 100644 --- a/ansi-tests/intersection.lsp +++ b/ansi-tests/intersection.lsp @@ -230,6 +230,12 @@ (not (eql x y)))))) (4)) +(defharmless intersection.test-and-test-not.1 + (intersection '(a b c) '(a c e) :test #'eql :test-not #'eql)) + +(defharmless intersection.test-and-test-not.2 + (intersection '(a b c) '(a c e) :test-not #'eql :test #'eql)) + ;;; Order of argument evaluation tests (deftest intersection.order.1 diff --git a/ansi-tests/load-cons.lsp b/ansi-tests/load-cons.lsp index a0bd1c1772637d74d1d20ce089fe39e6b530a3c0..3b522089b513d22627ea3da05a2e9b477f08bf0b 100644 --- a/ansi-tests/load-cons.lsp +++ b/ansi-tests/load-cons.lsp @@ -9,7 +9,6 @@ (load "rplaca.lsp") (load "rplacd.lsp") (load "copy-tree.lsp") -(load "tree-equal.lsp") (load "sublis.lsp") (load "nsublis.lsp") (load "subst.lsp") @@ -18,6 +17,7 @@ (load "nsubst.lsp") (load "nsubst-if.lsp") (load "nsubst-if-not.lsp") +(load "tree-equal.lsp") (load "copy-list.lsp") (load "list.lsp") (load "list-length.lsp") diff --git a/ansi-tests/member.lsp b/ansi-tests/member.lsp index 2a50ea259affd9805a46859e5d8cf47f105c37a4..ed855e848e41d9783cb424748572c41bd9eadaef 100644 --- a/ansi-tests/member.lsp +++ b/ansi-tests/member.lsp @@ -146,6 +146,12 @@ (member 10 '(1 2 3 4 10 11 14 18) :test-not #'>=) (11 14 18)) +(defharmless member.test-and-test-not.1 + (member 'b '(a b c) :test #'eql :test-not #'eql)) + +(defharmless member.test-and-test-not.2 + (member 'b '(a b c) :test-not #'eql :test #'eql)) + ;;; Order of evaluation (deftest member.order.1 diff --git a/ansi-tests/mismatch.lsp b/ansi-tests/mismatch.lsp index 2f9b4c34f8f205ce3786f160175bc0df6b58e27d..5aa3d3a15c2799acec4d0e6d32e5b3614b68d63e 100644 --- a/ansi-tests/mismatch.lsp +++ b/ansi-tests/mismatch.lsp @@ -597,6 +597,32 @@ (mismatch m a :from-end t))) (4 4 5 nil nil 6 5 6)) +;;; test and test-not tests + +(defharmless mismatch.test-and-test-not.1 + (mismatch '(1 2 3) '(1 2 4) :test #'eql :test-not #'eql)) + +(defharmless mismatch.test-and-test-not.2 + (mismatch '(1 2 3) '(1 2 4) :test-not #'eql :test #'eql)) + +(defharmless mismatch.test-and-test-not.3 + (mismatch #(1 2 3) #(1 2 4) :test #'eql :test-not #'eql)) + +(defharmless mismatch.test-and-test-not.4 + (mismatch #(1 2 3) #(1 2 4) :test-not #'eql :test #'eql)) + +(defharmless mismatch.test-and-test-not.5 + (mismatch "abc" "abd" :test #'eql :test-not #'eql)) + +(defharmless mismatch.test-and-test-not.6 + (mismatch "abc" "abd" :test-not #'eql :test #'eql)) + +(defharmless mismatch.test-and-test-not.7 + (mismatch #*011 #*010 :test #'eql :test-not #'eql)) + +(defharmless mismatch.test-and-test-not.8 + (mismatch #*011 #*010 :test-not #'eql :test #'eql)) + ;;; Keyword tests (deftest mismatch.allow-other-keys.1 diff --git a/ansi-tests/nintersection.lsp b/ansi-tests/nintersection.lsp index d1f7425cfb582d5fad74aa0d16e0e2923055539b..7bd1828448603713d6895c15d1af309f519fa141 100644 --- a/ansi-tests/nintersection.lsp +++ b/ansi-tests/nintersection.lsp @@ -194,6 +194,12 @@ (not (eql x y)))))) (4)) +(defharmless nintersection.test-and-test-not.1 + (nintersection (list 'a 'b 'c) (list 'a 'c 'e) :test #'eql :test-not #'eql)) + +(defharmless nintersection.test-and-test-not.2 + (nintersection (list 'a 'b 'c) (list 'a 'c 'e) :test-not #'eql :test #'eql)) + ;;; Order of argument evaluation tests (deftest nintersection.order.1 diff --git a/ansi-tests/nset-difference.lsp b/ansi-tests/nset-difference.lsp index 2250bf5618ec553dec2341361782d062c233e267..26fd8e8cacb7b88a2629c3aa8c063b700aa3c806 100644 --- a/ansi-tests/nset-difference.lsp +++ b/ansi-tests/nset-difference.lsp @@ -143,6 +143,12 @@ #'<)) (1 2 3 4)) +(defharmless nset-difference.test-and-test-not.1 + (nset-difference (list 1 2 3 4) (list 1 7 3 8) :test #'eql :test-not #'eql)) + +(defharmless nset-difference.test-and-test-not.2 + (nset-difference (list 1 2 3 4) (list 1 7 3 8) :test-not #'eql :test #'eql)) + ;;; Order of argument evaluation tests (deftest nset-difference.order.1 diff --git a/ansi-tests/nset-exclusive-or.lsp b/ansi-tests/nset-exclusive-or.lsp index 465a123458fb3d11864c859f6d5f328379de2a15..ca06683b6268c5c826d0b2299ac3f93913d3723a 100644 --- a/ansi-tests/nset-exclusive-or.lsp +++ b/ansi-tests/nset-exclusive-or.lsp @@ -166,6 +166,14 @@ t))))) t) +(defharmless nset-exclusive-or.test-and-test-not.1 + (nset-exclusive-or (list 1 2 3 4) (list 1 7 3 8) + :test #'eql :test-not #'eql)) + +(defharmless nset-exclusive-or.test-and-test-not.2 + (nset-exclusive-or (list 1 2 3 4) (list 1 7 3 8) + :test-not #'eql :test #'eql)) + ;;; Order of argument evaluation tests (deftest nset-exclusive-or.order.1 diff --git a/ansi-tests/nsublis.lsp b/ansi-tests/nsublis.lsp index d6c15a0188e31c725ebb9b1d2fdc8ba990d01e0b..9857c713266e769298a2b812ab9bfdfb470dd767 100644 --- a/ansi-tests/nsublis.lsp +++ b/ansi-tests/nsublis.lsp @@ -80,6 +80,14 @@ #'(lambda (x y) (not (and (realp x) (realp y) (< x y))))) (x y z 20)) +(defharmless nsublis.test-and-test-not.1 + (nsublis '((a . 1) (b . 2)) (list 'a 'b 'c 'd) + :test #'eql :test-not #'eql)) + +(defharmless nsublis.test-and-test-not.2 + (nsublis '((a . 1) (b . 2)) (list 'a 'b 'c 'd) + :test-not #'eql :test #'eql)) + ;;; Order of argument evaluation (deftest nsublis.order.1 (let ((i 0) w x y z) diff --git a/ansi-tests/nsubst.lsp b/ansi-tests/nsubst.lsp index 14436fa27b9f21862f3b9d8fd986c1457c0cb8f9..f025d9230d207505c1c87b0813b05983161b6a14 100644 --- a/ansi-tests/nsubst.lsp +++ b/ansi-tests/nsubst.lsp @@ -73,6 +73,12 @@ (not (and (realp x) (realp y) (< x y))))) (1 2 10 x x 4)) +(defharmless nsubset.test-and-test-not.1 + (nsubst 'a 'b (list 'a 'b 'c 'd 'e) :test #'eq :test-not #'eq)) + +(defharmless nsubset.test-and-test-not.2 + (nsubst 'a 'b (list 'a 'b 'c 'd 'e) :test-not #'eq :test #'eq)) + ;;; Order of argument evaluation (deftest nsubst.order.1 (let ((i 0) v w x y z) diff --git a/ansi-tests/nsubstitute.lsp b/ansi-tests/nsubstitute.lsp index ea6a6b0d993ced3841e5b1d57e4567e4503062b4..c3f808fc9472051b2b92de2356b0671330a48fa8 100644 --- a/ansi-tests/nsubstitute.lsp +++ b/ansi-tests/nsubstitute.lsp @@ -722,6 +722,31 @@ result) #*0101011111) +(defharmless nsubstitute.test-and-test-not.1 + (nsubstitute 'b 'a (list 'a 'b 'c 'd 'a 'b) :test #'eql :test-not #'eql)) + +(defharmless nsubstitute.test-and-test-not.2 + (nsubstitute 'b 'a (list 'a 'b 'c 'd 'a 'b) :test-not #'eql :test #'eql)) + +(defharmless nsubstitute.test-and-test-not.3 + (nsubstitute 'b 'a (vector 'a 'b 'c 'd 'a 'b) :test #'eql :test-not #'eql)) + +(defharmless nsubstitute.test-and-test-not.4 + (nsubstitute 'b 'a (vector 'a 'b 'c 'd 'a 'b) :test-not #'eql :test #'eql)) + +(defharmless nsubstitute.test-and-test-not.5 + (nsubstitute #\b #\a (copy-seq "abcdab") :test #'eql :test-not #'eql)) + +(defharmless nsubstitute.test-and-test-not.6 + (nsubstitute #\b #\a (copy-seq "abcdab") :test-not #'eql :test #'eql)) + +(defharmless nsubstitute.test-and-test-not.7 + (nsubstitute 1 0 (copy-seq #*001101001) :test #'eql :test-not #'eql)) + +(defharmless nsubstitute.test-and-test-not.8 + (nsubstitute 0 1 (copy-seq #*1100110101) :test-not #'eql :test #'eql)) + + ;;;; additional tests (deftest nsubstitute-list.24 diff --git a/ansi-tests/nunion.lsp b/ansi-tests/nunion.lsp index 496b2a45340c78a8eaf50594323ca91d31ef3f3e..9f550b2fd38198444ebf75ea2e4f3d893cb7579a 100644 --- a/ansi-tests/nunion.lsp +++ b/ansi-tests/nunion.lsp @@ -203,7 +203,11 @@ (list (copy-seq "aa"))) ("aa" "aa")) +(defharmless nunion.test-and-test-not.1 + (nunion (list 1 4 8 10) (list 1 2 3 9 10 13) :test #'eql :test-not #'eql)) +(defharmless nunion.test-and-test-not.2 + (nunion (list 1 4 8 10) (list 1 2 3 9 10 13) :test-not #'eql :test #'eql)) ;; Check that nunion does not reverse the arguments to :test, :test-not diff --git a/ansi-tests/position.lsp b/ansi-tests/position.lsp index f512d6456a78892cbcbc184229240904590b9fe6..aa5da8e55a52810afcf8763c3ba201d6c624cffe 100644 --- a/ansi-tests/position.lsp +++ b/ansi-tests/position.lsp @@ -670,6 +670,30 @@ (position #\m "adfmpz" :test-not #'char>=) 4) +(defharmless position.test-and-test-not.1 + (position 'b '(a b c d) :test #'eql :test-not #'eql)) + +(defharmless position.test-and-test-not.2 + (position 'b '(a b c d) :test-not #'eql :test #'eql)) + +(defharmless position.test-and-test-not.3 + (position 'b #(a b c d) :test #'eql :test-not #'eql)) + +(defharmless position.test-and-test-not.4 + (position 'b #(a b c d) :test-not #'eql :test #'eql)) + +(defharmless position.test-and-test-not.5 + (position #\b "abcd" :test #'eql :test-not #'eql)) + +(defharmless position.test-and-test-not.6 + (position #\b "abcd" :test-not #'eql :test #'eql)) + +(defharmless position.test-and-test-not.7 + (position 1 #*001010010 :test #'eql :test-not #'eql)) + +(defharmless position.test-and-test-not.8 + (position 0 #*1110010110111 :test-not #'eql :test #'eql)) + (deftest position.order.1 (let ((i 0) a b c d e f g) (values diff --git a/ansi-tests/pushnew.lsp b/ansi-tests/pushnew.lsp index e82216f5787163d3031903d21bf611d991df35cb..5dab7061567ffbef828ab211c3eaeaa073ad5d28 100644 --- a/ansi-tests/pushnew.lsp +++ b/ansi-tests/pushnew.lsp @@ -185,6 +185,13 @@ (1 2 3) (1 2 3)) +(defharmless pushnew.test-and-test-not.1 + (let ((x '(b c))) (pushnew 'a x :test #'eql :test-not #'eql))) + +(defharmless pushnew.test-and-test-not.2 + (let ((x '(b c))) (pushnew 'a x :test-not #'eql :test #'eql))) + + (deftest pushnew.order.1 (let ((x (vector nil nil nil nil)) (y (vector 'a 'b 'c 'd)) diff --git a/ansi-tests/rassoc.lsp b/ansi-tests/rassoc.lsp index 9a8f4916170b617f5e0c816883c3c4e4dd615bcb..2d829882e31a88ddd70c3c864765b3a83d241d8c 100644 --- a/ansi-tests/rassoc.lsp +++ b/ansi-tests/rassoc.lsp @@ -188,6 +188,12 @@ :test-not #'>=) (d . 15)) +(defharmless rassoc.test-and-test-not.1 + (rassoc 'a '((x . b) (y . a) (z . c)) :test #'eql :test-not #'eql)) + +(defharmless rassoc.test-and-test-not.2 + (rassoc 'a '((x . b) (y . a) (z . c)) :test-not #'eql :test #'eql)) + ;;; Order of argument evaluation (deftest rassoc.order.1 diff --git a/ansi-tests/remove-duplicates.lsp b/ansi-tests/remove-duplicates.lsp index ac5956b9c8268e640096111698c659d436cc7f61..e17adf53b216452d17bd5c68ba2e0557af51efd3 100644 --- a/ansi-tests/remove-duplicates.lsp +++ b/ansi-tests/remove-duplicates.lsp @@ -31,6 +31,22 @@ y) (3 4 1 5 6 2 7)) +(defharmless remove-duplicates.test-and-test-not.1 + (remove-duplicates (list 'a 'b 'c 'd 'a 'e 'f 'd 'g) :test #'eql + :test-not #'eql)) + +(defharmless remove-duplicates.test-and-test-not.2 + (remove-duplicates (list 'a 'b 'c 'd 'a 'e 'f 'd 'g) :test-not #'eql + :test #'eql)) + +(defharmless delete-duplicates.test-and-test-not.1 + (delete-duplicates (list 'a 'b 'c 'd 'a 'e 'f 'd 'g) :test #'eql + :test-not #'eql)) + +(defharmless delete-duplicates.test-and-test-not.2 + (delete-duplicates (list 'a 'b 'c 'd 'a 'e 'f 'd 'g) :test-not #'eql + :test #'eql)) + ;;; Order of evaluation tests diff --git a/ansi-tests/remove.lsp b/ansi-tests/remove.lsp index ecb012797d90613124bca8fb5bd60540afb14cba..0945002508493a87a45b9feee072805b2094c4ca 100644 --- a/ansi-tests/remove.lsp +++ b/ansi-tests/remove.lsp @@ -366,6 +366,58 @@ (delete 0 (copy-seq #*11111) :count -1) #*11111) +;;; test & test-not together is harmless + +(defharmless remove-list.test-and-test-not.1 + (remove 'a '(a b c) :test #'eql :test-not #'eql)) + +(defharmless remove-list.test-and-test-not.2 + (remove 'a '(a b c) :test-not #'eql :test #'eql)) + +(defharmless remove-vector.test-and-test-not.1 + (remove 'a #(a b c) :test #'eql :test-not #'eql)) + +(defharmless remove-vector.test-and-test-not.2 + (remove 'a #(a b c) :test-not #'eql :test #'eql)) + +(defharmless remove-bit-string.test-and-test-not.1 + (remove 0 #*0001100100 :test #'eql :test-not #'eql)) + +(defharmless remove-bit-string.test-and-test-not.2 + (remove 0 #*0001100100 :test-not #'eql :test #'eql)) + +(defharmless remove-string.test-and-test-not.1 + (remove #\0 "0001100100" :test #'eql :test-not #'eql)) + +(defharmless remove-string.test-and-test-not.2 + (remove #\0 "0001100100" :test-not #'eql :test #'eql)) + + +(defharmless delete-list.test-and-test-not.1 + (delete 'a (list 'a 'b 'c) :test #'eql :test-not #'eql)) + +(defharmless delete-list.test-and-test-not.2 + (delete 'a (list 'a 'b 'c) :test-not #'eql :test #'eql)) + +(defharmless delete-vector.test-and-test-not.1 + (delete 'a (vector 'a 'b 'c) :test #'eql :test-not #'eql)) + +(defharmless delete-vector.test-and-test-not.2 + (delete 'a (vector 'a 'b 'c) :test-not #'eql :test #'eql)) + +(defharmless delete-bit-string.test-and-test-not.1 + (delete 0 (copy-seq #*0001100100) :test #'eql :test-not #'eql)) + +(defharmless delete-bit-string.test-and-test-not.2 + (delete 0 (copy-seq #*0001100100) :test-not #'eql :test #'eql)) + +(defharmless delete-string.test-and-test-not.1 + (delete #\0 (copy-seq "0001100100") :test #'eql :test-not #'eql)) + +(defharmless delete-string.test-and-test-not.2 + (delete #\0 (copy-seq "0001100100") :test-not #'eql :test #'eql)) + + ;;; Order of evaluation tests (deftest remove.order.1 diff --git a/ansi-tests/search-list.lsp b/ansi-tests/search-list.lsp index 69f4b205020d349cae451c3f5e9f82b400c0ac3e..2d205a84af3859d5355e31eaed817dff6b9b0cfe 100644 --- a/ansi-tests/search-list.lsp +++ b/ansi-tests/search-list.lsp @@ -139,15 +139,39 @@ (deftest search-list.15 (let ((pat '(10)) (target '(1 4 6 10 15 20))) - (search pat target :test #'<)) + (search pat target :test #'>)) 4) (deftest search-list.16 (let ((pat '(10)) (target '(1 4 6 10 15 20))) - (search pat target :test-not #'>=)) + (search pat target :test-not #'<=)) 4) +(defharmless search.test-and-test-not.1 + (search '(b c) '(a b c d) :test #'eql :test-not #'eql)) + +(defharmless search.test-and-test-not.2 + (search '(b c) '(a b c d) :test-not #'eql :test #'eql)) + +(defharmless search.test-and-test-not.3 + (search #(b c) #(a b c d) :test #'eql :test-not #'eql)) + +(defharmless search.test-and-test-not.4 + (search #(b c) #(a b c d) :test-not #'eql :test #'eql)) + +(defharmless search.test-and-test-not.5 + (search "bc" "abcd" :test #'eql :test-not #'eql)) + +(defharmless search.test-and-test-not.6 + (search "bc" "abcd" :test-not #'eql :test #'eql)) + +(defharmless search.test-and-test-not.7 + (search #*01 #*0011 :test #'eql :test-not #'eql)) + +(defharmless search.test-and-test-not.8 + (search #*01 #*0011 :test-not #'eql :test #'eql)) + ;;; Keyword tests diff --git a/ansi-tests/set-difference.lsp b/ansi-tests/set-difference.lsp index 356fbde9d3f201c2e1458d48b8354c3aafc7a390..e1aff9e4f0967c61e21fe5b0a7e051765600b191 100644 --- a/ansi-tests/set-difference.lsp +++ b/ansi-tests/set-difference.lsp @@ -144,6 +144,12 @@ #'<)) (1 2 3 4)) +(defharmless set-difference.test-and-test-not.1 + (set-difference (list 1 2 3 4) (list 1 7 3 8) :test #'eql :test-not #'eql)) + +(defharmless set-difference.test-and-test-not.2 + (set-difference (list 1 2 3 4) (list 1 7 3 8) :test-not #'eql :test #'eql)) + ;;; Order of argument evaluation tests (deftest set-difference.order.1 diff --git a/ansi-tests/set-exclusive-or.lsp b/ansi-tests/set-exclusive-or.lsp index 78b3a2bd185e3546bf6fe3266b729a48fb2cf636..7464677eb5bee643e5e579f447cdef4fd1243d94 100644 --- a/ansi-tests/set-exclusive-or.lsp +++ b/ansi-tests/set-exclusive-or.lsp @@ -166,6 +166,15 @@ t))))) t) +(defharmless set-exclusive-or.test-and-test-not.1 + (set-exclusive-or (list 1 2 3 4) (list 1 7 3 8) + :test #'eql :test-not #'eql)) + +(defharmless set-exclusive-or.test-and-test-not.2 + (set-exclusive-or (list 1 2 3 4) (list 1 7 3 8) + :test-not #'eql :test #'eql)) + + ;;; Order of argument evaluation tests (deftest set-exclusive-or.order.1 diff --git a/ansi-tests/sublis.lsp b/ansi-tests/sublis.lsp index 5b508a528275763c6af86cdf2c5b745f5d88f23d..8740d05d2dc150d69031846c1f0f9b261c446a49 100644 --- a/ansi-tests/sublis.lsp +++ b/ansi-tests/sublis.lsp @@ -76,6 +76,14 @@ #'(lambda (x y) (not (and (realp x) (realp y) (< x y))))) (x y z 20)) +(defharmless sublis.test-and-test-not.1 + (sublis '((a . 1) (b . 2)) (list 'a 'b 'c 'd) + :test #'eql :test-not #'eql)) + +(defharmless sublis.test-and-test-not.2 + (sublis '((a . 1) (b . 2)) (list 'a 'b 'c 'd) + :test-not #'eql :test #'eql)) + ;;; Order of argument evaluation (deftest sublis.order.1 (let ((i 0) w x y z) diff --git a/ansi-tests/subsetp.lsp b/ansi-tests/subsetp.lsp index 450490ea7cf6de997bf43a9467d140e52f8fcaee..ae2fd11f519173bbe57c71eb3481c01fa84d7f9e 100644 --- a/ansi-tests/subsetp.lsp +++ b/ansi-tests/subsetp.lsp @@ -121,6 +121,12 @@ nil))) t) +(defharmless subsetp.test-and-test-not.1 + (subsetp '(a b c) '(a g c e b) :test #'eql :test-not #'eql)) + +(defharmless subsetp.test-and-test-not.3 + (subsetp '(a b c) '(a g c e b) :test-not #'eql :test #'eql)) + ;;; Order of argument evaluation tests (deftest subsetp.order.1 diff --git a/ansi-tests/subst.lsp b/ansi-tests/subst.lsp index de9c877f4b6cabd5b3c9a035982a293bd5112ac6..41389609d2fc18ccc7480c79947734327e9606cf 100644 --- a/ansi-tests/subst.lsp +++ b/ansi-tests/subst.lsp @@ -72,6 +72,13 @@ (not (and (realp x) (realp y) (< x y))))) (1 2 10 x x 4)) +(defharmless subset.test-and-test-not.1 + (subst 'a 'b (list 'a 'b 'c 'd 'e) :test #'eq :test-not #'eq)) + +(defharmless subset.test-and-test-not.2 + (subst 'a 'b (list 'a 'b 'c 'd 'e) :test-not #'eq :test #'eq)) + + ;;; Order of argument evaluation (deftest subst.order.1 (let ((i 0) v w x y z) diff --git a/ansi-tests/substitute.lsp b/ansi-tests/substitute.lsp index bd17f8e5aa1f77b2859d265312be5b9788f6748f..201f0249ad283079386fd60d3da3292a7356ab34 100644 --- a/ansi-tests/substitute.lsp +++ b/ansi-tests/substitute.lsp @@ -966,6 +966,31 @@ result) #*01111) +(defharmless substitute.test-and-test-not.1 + (substitute 'b 'a (list 'a 'b 'c 'd 'a 'b) :test #'eql :test-not #'eql)) + +(defharmless substitute.test-and-test-not.2 + (substitute 'b 'a (list 'a 'b 'c 'd 'a 'b) :test-not #'eql :test #'eql)) + +(defharmless substitute.test-and-test-not.3 + (substitute 'b 'a (vector 'a 'b 'c 'd 'a 'b) :test #'eql :test-not #'eql)) + +(defharmless substitute.test-and-test-not.4 + (substitute 'b 'a (vector 'a 'b 'c 'd 'a 'b) :test-not #'eql :test #'eql)) + +(defharmless substitute.test-and-test-not.5 + (substitute #\b #\a (copy-seq "abcdab") :test #'eql :test-not #'eql)) + +(defharmless substitute.test-and-test-not.6 + (substitute #\b #\a (copy-seq "abcdab") :test-not #'eql :test #'eql)) + +(defharmless substitute.test-and-test-not.7 + (substitute 1 0 (copy-seq #*001101001) :test #'eql :test-not #'eql)) + +(defharmless substitute.test-and-test-not.8 + (substitute 0 1 (copy-seq #*1100110101) :test-not #'eql :test #'eql)) + + (deftest substitute.order.1 (let ((i 0) a b c d e f g h) (values diff --git a/ansi-tests/tree-equal.lsp b/ansi-tests/tree-equal.lsp index c9bb3aaa2e788dd867f1e668d5be6613f4fb3834..73d9c8415f3c352b66ac5fd9cfcd1570ea4d2432 100644 --- a/ansi-tests/tree-equal.lsp +++ b/ansi-tests/tree-equal.lsp @@ -79,6 +79,12 @@ (tree-equal x y)) nil) +(defharmless tree-equal.test-and-test-not.1 + (tree-equal '(a b) '(a b) :test #'eql :test-not #'eql)) + +(defharmless tree-equal.test-and-test-not.2 + (tree-equal '(a b) '(a b) :test-not #'eql :test #'eql)) + ;;; Keywords tests (deftest tree-equal.allow-other-keys.1 @@ -98,6 +104,13 @@ :allow-other-keys nil :foo t)) t) +(deftest tree-equal.keywords.1 + (notnot-mv (tree-equal '(a . b) '(b . a) + :test (complement #'eql) + :test #'eql)) + t) + + ;;; Error tests (deftest tree-equal.error.1 @@ -116,10 +129,10 @@ (classify-error (tree-equal '(a b) '(a b) (gensym) t :allow-other-keys nil)) program-error) +(deftest tree-equal.error.5 + (classify-error (tree-equal '(a b) '(a b) :test #'identity)) + program-error) - - - - - - \ No newline at end of file +(deftest tree-equal.error.6 + (classify-error (tree-equal '(a b) '(a b) :test #'(lambda (x y z) (eq x y)))) + program-error) diff --git a/ansi-tests/union.lsp b/ansi-tests/union.lsp index 4e84766c117b69d1c357b6cee166f42972cee505..200030d83fb5c549fe41a204e7bc5f789462829c 100644 --- a/ansi-tests/union.lsp +++ b/ansi-tests/union.lsp @@ -259,6 +259,13 @@ #'<)) (1 2 3 4 5 6)) +(defharmless union.test-and-test-not.1 + (union (list 1 4 8 10) (list 1 2 3 9 10 13) :test #'eql :test-not #'eql)) + +(defharmless union.test-and-test-not.2 + (union (list 1 4 8 10) (list 1 2 3 9 10 13) :test-not #'eql :test #'eql)) + + ;;; Order of evaluation tests (deftest union.order.1