From f947d503f748fd1218f502ef1394ff9e28175ef8 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Mon, 3 Nov 2014 22:29:51 -0600 Subject: R: atom support, fixes for self-hosting. --- tests/step4_if_fn_do.mal | 2 ++ tests/step6_file.mal | 5 +++++ tests/step8_macros.mal | 7 +++++++ tests/step9_try.mal | 2 ++ 4 files changed, 16 insertions(+) (limited to 'tests') diff --git a/tests/step4_if_fn_do.mal b/tests/step4_if_fn_do.mal index 51ddbe9..ee30ea3 100644 --- a/tests/step4_if_fn_do.mal +++ b/tests/step4_if_fn_do.mal @@ -62,6 +62,8 @@ (= 2 (+ 1 1)) ;=>true (= nil 1) +;=>false +(= nil nil) ;=>true (> 2 1) diff --git a/tests/step6_file.mal b/tests/step6_file.mal index 8198391..f102c34 100644 --- a/tests/step6_file.mal +++ b/tests/step6_file.mal @@ -21,6 +21,11 @@ (inc3 9) ;=>12 +;; +;; Testing that (do (do)) not broken by TCO +(do (do 1 2)) +;=>2 + ;; ;; -------- Optional Functionality -------- diff --git a/tests/step8_macros.mal b/tests/step8_macros.mal index 93f3ea9..f2f62dc 100644 --- a/tests/step8_macros.mal +++ b/tests/step8_macros.mal @@ -15,6 +15,13 @@ ;=>(8 9) +;; Testing non-macro function +(not (= 1 1)) +;=>false +;;; This should fail if it is a macro +(not (= 1 2)) +;=>true + ;; Testing trivial macros (defmacro! one (fn* () 1)) diff --git a/tests/step9_try.mal b/tests/step9_try.mal index f5bcb58..aee7908 100644 --- a/tests/step9_try.mal +++ b/tests/step9_try.mal @@ -61,6 +61,8 @@ ;=>6 (map double nums) ;=>(2 4 6) +(map (fn* [x] (symbol? x)) (list 1 (symbol "two") "three")) +;=>(false true false) ;; ;; Testing read-str and eval -- cgit v1.2.3