From 77583a881b03ce38c8065c40641489fe88b61eb2 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sun, 9 Jan 2022 22:55:59 -0800 Subject: Write the linker. --- list-test.csc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'list-test.csc') diff --git a/list-test.csc b/list-test.csc index d4ea504..6e910c0 100644 --- a/list-test.csc +++ b/list-test.csc @@ -73,3 +73,23 @@ (test intercalate-singleton (assert-equal '(1) (intercalate "," '(1)))) + + +(test enumerate-simple + (assert-equal '((0 . a) (1 . b) (2 . c) (3 . d)) (enumerate '(a b c d)))) + + +(test enumerate-nil + (assert-equal '() (enumerate '()))) + + +(test enumerate-singleton + (assert-equal '((0 . "test")) (enumerate '("test")))) + + +(test filter-even + (assert-equal '(0 2 4 6 8) (filter even? '(0 1 2 3 4 5 6 7 8 9)))) + + +(test filter-odd + (assert-equal '(1 3 5 7 9) (filter odd? '(0 1 2 3 4 5 6 7 8 9)))) -- cgit v1.3.1