From 9dc282a130312333e96a9d2edfa1fd5cd351fd3f Mon Sep 17 00:00:00 2001 From: Akshay Date: Sat, 10 Apr 2021 10:23:42 +0530 Subject: add std lisp tests --- src/lisp/test.lisp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/lisp/test.lisp (limited to 'src/lisp') diff --git a/src/lisp/test.lisp b/src/lisp/test.lisp new file mode 100644 index 0000000..53b0f59 --- /dev/null +++ b/src/lisp/test.lisp @@ -0,0 +1,17 @@ +(assert-eq + (range 0 10) + '(0 1 2 3 4 5 6 7 8 9)) + +(assert-eq + (for (i (range 0 10)) (+ i 1)) + (map (lambda (x) (+ x 1)) (range 0 10))) + +(assert (and #t #t)) +(assert (or #f #t)) +(assert (not #f)) + +(assert-eq + (for (i '(1 2 3)) (for (j '(1 2 3)) (+ i j))) + (list '(2 3 4) '(3 4 5) '(4 5 6))) + + -- cgit v1.2.3