From 2669d6cf38b520476ba7b8aeee557e2d9c382ef4 Mon Sep 17 00:00:00 2001 From: Owen Rodley Date: Sat, 4 May 2013 18:03:27 +1200 Subject: [PATCH] Rewrite ACONS and PAIRLIS tests using dotted lists --- tests/list.lisp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/list.lisp b/tests/list.lisp index 78cec44..4be2453 100644 --- a/tests/list.lisp +++ b/tests/list.lisp @@ -39,16 +39,15 @@ (test (tailp 'a (cons 'b 'a))) ; ACONS -; FIXME: Write the alist in a more natural form once #72 has been fixed -(test (equal (cons (cons 1 2) (list (cons 3 4))) - (acons 1 2 (list (cons 3 4))))) -(test (equal (list (cons 1 2)) (acons 1 2 ()))) +(test (equal '((1 . 2) (3 . 4)) + (acons 1 2 '((3 . 4))))) +(test (equal '((1 . 2)) (acons 1 2 ()))) ; PAIRLIS -(test (equal (list (cons 1 3) (cons 0 2)) +(test (equal '((1 . 3) (0 . 2)) (pairlis '(0 1) '(2 3)))) -(test (equal (list (cons 1 2) (cons 'a 'b)) - (pairlis '(1) '(2) (list (cons 'a 'b))))) +(test (equal '((1 . 2) (a . b)) + (pairlis '(1) '(2) '((a . b))))) ; SUBST ; Can't really test this until EQUAL works properly on lists -- 1.7.10.4