From b014552d09872e82c6be828136b01b8a104bfee9 Mon Sep 17 00:00:00 2001 From: MadMaurice Date: Fri, 2 Apr 2021 20:53:12 +0200 Subject: [PATCH] Add test that compares unequal lists --- t/lists.t | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/t/lists.t b/t/lists.t index b079959..6835252 100644 --- a/t/lists.t +++ b/t/lists.t @@ -6,6 +6,13 @@ (expect "Third element is 3" (= (nth 2 lst) 3)) (expect "Equal to itself" (equal lst lst)) (expect "Equal to identical list" (equal lst (list 1 2 3))) + (expect "Not equal to different list" (not (equal lst (list 2 3 4)))) (expect "Reduce with +" (= (reduce + lst) 6)) (expect "Map doubling values" (equal (map (lambda (x) (* x 2)) lst) (list 2 4 6))) ) + +(expect "equal tests recursively 1" + (equal (list (list 1) (list 2)) (list (list 1) (list 2)))) + +(expect "equal tests recursively 2" + (not (equal (list (list 1) (list 2)) (list (list 1) (list 3)))))