Add test that compares unequal lists
This commit is contained in:
parent
42f0e3bc99
commit
b014552d09
1 changed files with 7 additions and 0 deletions
|
@ -6,6 +6,13 @@
|
||||||
(expect "Third element is 3" (= (nth 2 lst) 3))
|
(expect "Third element is 3" (= (nth 2 lst) 3))
|
||||||
(expect "Equal to itself" (equal lst lst))
|
(expect "Equal to itself" (equal lst lst))
|
||||||
(expect "Equal to identical list" (equal lst (list 1 2 3)))
|
(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 "Reduce with +" (= (reduce + lst) 6))
|
||||||
(expect "Map doubling values" (equal (map (lambda (x) (* x 2)) lst) (list 2 4 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)))))
|
||||||
|
|
Loading…
Reference in a new issue