X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Flist.lisp;h=2f1b57cc93167022ada2712f2239d5154fd32548;hb=b1e6df4cc0e0c5162cc1c85a7977ae6f669b7a5f;hp=d8086e2fa4c5032f5d38675f6d40f43edba63e60;hpb=0c673afe782ea04c81cebee2a4060581ff99184d;p=jscl.git diff --git a/tests/list.lisp b/tests/list.lisp index d8086e2..2f1b57c 100644 --- a/tests/list.lisp +++ b/tests/list.lisp @@ -69,6 +69,16 @@ (test (equal (member 4 '((1 . 2) (3 . 4)) :key #'cdr) '((3 . 4)))) (test (member '(2) '((1) (2) (3)) :test #'equal)) +; ADJOIN +(test (equal (adjoin 1 '(2 3)) '(1 2 3))) +(test (equal (adjoin 1 '(1 2 3)) '(1 2 3))) +(test (equal (adjoin '(1) '((1) (2)) :test #'equal) '((1) (2)))) + +; INTERSECTION +(test (equal (intersection '(1 2) '(2 3)) '(2))) +(test (not (intersection '(1 2 3) '(4 5 6)))) +(test (equal (intersection '((1) (2)) '((2) (3)) :test #'equal) '((2)))) + ; SUBST ; Can't really test this until EQUAL works properly on lists