Rewrite ACONS and PAIRLIS tests using dotted lists
authorOwen Rodley <Strigoides@gmail.com>
Sat, 4 May 2013 06:03:27 +0000 (18:03 +1200)
committerOwen Rodley <Strigoides@gmail.com>
Sat, 4 May 2013 06:03:27 +0000 (18:03 +1200)
tests/list.lisp

index 78cec44..4be2453 100644 (file)
 (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