From 52da9c556a170ed8e5f811c3acd56088baf94c80 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sun, 26 Jun 2022 20:14:19 -0700 Subject: Finish CPS. Wow we actually finished CPS. Next is closure conversion, then codegen, and then we should be able to run some end to end tests. Then we can look at garbage collection, and from there continue building features down the long road to self hosting. --- csc/list-test.csc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'csc/list-test.csc') diff --git a/csc/list-test.csc b/csc/list-test.csc index d4c145a..faa90b6 100644 --- a/csc/list-test.csc +++ b/csc/list-test.csc @@ -98,5 +98,18 @@ (test unzip-empty (assert (values= (values '() '()) (unzip '())))) + (test unzip-simple (assert (values= (values '(1 2 3) '(4 5 6)) (unzip '((1 . 4) (2 . 5) (3 . 6)))))) + + +(test all-even + (assert-equal + #t + (all (lambda (x) (= 0 (remainder x 2))) '(2 12 8)))) + + +(test some-odd + (assert-equal + #f + (all (lambda (x) (= 0 (remainder x 2))) '(2 13 8)))) -- cgit v1.3.1