aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2015-02-21 15:58:23 -0600
committerJoel Martin <github@martintribe.org>2015-02-21 15:58:23 -0600
commit5a5edd508d20775fddcb5931f263042d8e0d8fef (patch)
treeb9a87ba85eb46fef75a791d45507a9facf1e88ae
parent2ffb2af827faf4df00a93761b9e4f5948738d63f (diff)
parentdb11c7402768391a803cf83a4c55cac5e8202eb4 (diff)
downloadmal-5a5edd508d20775fddcb5931f263042d8e0d8fef.tar.gz
mal-5a5edd508d20775fddcb5931f263042d8e0d8fef.zip
Merge pull request #6 from Chouser/tests-pr
Update some tests, discovered during forth impl
-rw-r--r--tests/step1_read_print.mal1
-rw-r--r--tests/step4_if_fn_do.mal2
-rw-r--r--tests/step9_try.mal4
3 files changed, 7 insertions, 0 deletions
diff --git a/tests/step1_read_print.mal b/tests/step1_read_print.mal
index 8172479..985b5fb 100644
--- a/tests/step1_read_print.mal
+++ b/tests/step1_read_print.mal
@@ -116,6 +116,7 @@ abc-def
;=>{"a" {"b" {"c" 3}}}
{ "a" {"b" { "cde" 3 } }}
;=>{"a" {"b" {"cde" 3}}}
+{ :a {:b { :cde 3 } }}
;=>{:a {:b {:cde 3}}}
;; Testing read of comments
diff --git a/tests/step4_if_fn_do.mal b/tests/step4_if_fn_do.mal
index 4adb4c8..34966f5 100644
--- a/tests/step4_if_fn_do.mal
+++ b/tests/step4_if_fn_do.mal
@@ -43,6 +43,8 @@
;=>7
(if (list 1 2 3) 7 8)
;=>7
+(= (list) nil)
+;=>false
;; Testing 1-way if form
diff --git a/tests/step9_try.mal b/tests/step9_try.mal
index 0ac0bf2..c7483ba 100644
--- a/tests/step9_try.mal
+++ b/tests/step9_try.mal
@@ -21,6 +21,10 @@
; "exc:" "my exception"
;=>7
+;;; Test that throw is a function:
+(try* (map throw [7]) (catch* exc exc))
+;=>7
+
;;
;; Testing builtin functions