diff options
| author | Rose Hogenson <rhogenson@posteo.net> | 2022-01-09 22:55:59 -0800 |
|---|---|---|
| committer | Rose Hogenson <rhogenson@posteo.net> | 2022-01-09 22:55:59 -0800 |
| commit | 77583a881b03ce38c8065c40641489fe88b61eb2 (patch) | |
| tree | d4f65cfd698fee8e63168b4a5b64ab4123177fc3 /list-test.csc | |
| parent | Remove str- prefixes from the strings library. (diff) | |
| download | chromatopelma-77583a881b03ce38c8065c40641489fe88b61eb2.tar.zst | |
Write the linker.
Diffstat (limited to 'list-test.csc')
| -rw-r--r-- | list-test.csc | 20 |
1 files changed, 20 insertions, 0 deletions
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)))) |
