(lset-adjoin): Amend tests to expect duplicates among args cast out.
authorKevin Ryde <user42@zip.com.au>
Thu, 17 Feb 2005 21:15:46 +0000 (21:15 +0000)
committerKevin Ryde <user42@zip.com.au>
Thu, 17 Feb 2005 21:15:46 +0000 (21:15 +0000)
test-suite/tests/srfi-1.test

index 065e8a9..dc2a6e4 100644 (file)
                   '(1) 2)
       good))
 
-  (pass-if "called against arg list only"
-    (let ((good #t))
-      (lset-adjoin (lambda (x y)
-                    (set! good (and good
-                                    (= x 1)
-                                    (or (= y 2) (= y 3)))))
-                  '(1) 2 3)
-      good)))
+  (pass-if "(1 1) 1 1"
+    (equal? '(1 1) (lset-adjoin = '(1 1) 1 1)))
+
+  ;; duplicates among args are cast out
+  (pass-if "(2) 1 1"
+    (equal? '(1 2) (lset-adjoin = '(2) 1 1))))
 
 ;;
 ;; member