Add test that compares unequal lists

This commit is contained in:
madmaurice 2021-04-02 20:53:12 +02:00
parent 42f0e3bc99
commit b014552d09

View file

@ -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)))))