diff options
author | ubq323 <ubq323@ubq323.website> | 2024-08-06 22:20:18 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-08-06 22:20:18 +0100 |
commit | e4a7b6c397c430e3aa5f6fec63eeb91236069c27 (patch) | |
tree | ccd2837dc1d13f23a3cbf23330c6be0b943a63a5 | |
parent | a701883f4ea83022261304d225eb8225af52b302 (diff) |
tests
-rw-r--r-- | tests/strlit.bth | 3 | ||||
-rw-r--r-- | tests/strlit.out | 3 | ||||
-rw-r--r-- | tests/sumrec_local2.bth | 8 | ||||
-rw-r--r-- | tests/sumrec_local2.out | 2 |
4 files changed, 16 insertions, 0 deletions
diff --git a/tests/strlit.bth b/tests/strlit.bth new file mode 100644 index 0000000..5894375 --- /dev/null +++ b/tests/strlit.bth @@ -0,0 +1,3 @@ +(say "hello") +(say 'hello) +(say (= "hello" 'hello)) diff --git a/tests/strlit.out b/tests/strlit.out new file mode 100644 index 0000000..60baf7c --- /dev/null +++ b/tests/strlit.out @@ -0,0 +1,3 @@ +hello +hello +true diff --git a/tests/sumrec_local2.bth b/tests/sumrec_local2.bth new file mode 100644 index 0000000..c9b9703 --- /dev/null +++ b/tests/sumrec_local2.bth @@ -0,0 +1,8 @@ +(defn (f x) + (defn (f' x acc) + (if (< x 1) + acc + (f' (- x 1) (+ acc x)))) + (f' x 0)) +(say (f 10)) +(say (f 1000)) diff --git a/tests/sumrec_local2.out b/tests/sumrec_local2.out new file mode 100644 index 0000000..2a5dbfe --- /dev/null +++ b/tests/sumrec_local2.out @@ -0,0 +1,2 @@ +55 +500500 |