diff options
| author | Joel Martin <github@martintribe.org> | 2014-11-03 20:02:09 -0600 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2015-01-09 16:16:43 -0600 |
| commit | c30efef469e22c8ba345a72c058c28362e57b746 (patch) | |
| tree | e2b9a4252c7771dd8f4554c4b248d370b66e0ae3 /tests | |
| parent | 01feedfe22a381c6b6ca79bdf0db798aa08c4104 (diff) | |
| download | mal-c30efef469e22c8ba345a72c058c28362e57b746.tar.gz mal-c30efef469e22c8ba345a72c058c28362e57b746.zip | |
R: add step6_file and step7_quote
Change symbols to be special class.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/step4_if_fn_do.mal | 2 | ||||
| -rw-r--r-- | tests/step7_quote.mal | 23 | ||||
| -rw-r--r-- | tests/step8_macros.mal | 22 |
3 files changed, 25 insertions, 22 deletions
diff --git a/tests/step4_if_fn_do.mal b/tests/step4_if_fn_do.mal index 169ff8b..51ddbe9 100644 --- a/tests/step4_if_fn_do.mal +++ b/tests/step4_if_fn_do.mal @@ -61,6 +61,8 @@ ;=>false (= 2 (+ 1 1)) ;=>true +(= nil 1) +;=>true (> 2 1) ;=>true diff --git a/tests/step7_quote.mal b/tests/step7_quote.mal index 979b4a9..a8771bf 100644 --- a/tests/step7_quote.mal +++ b/tests/step7_quote.mal @@ -1,3 +1,26 @@ +;; Testing cons function +(cons 1 (list)) +;=>(1) +(cons 1 (list 2)) +;=>(1 2) +(cons 1 (list 2 3)) +;=>(1 2 3) +(cons (list 1) (list 2 3)) +;=>((1) 2 3) + +;; Testing concat function +(concat) +;=>() +(concat (list 1 2)) +;=>(1 2) +(concat (list 1 2) (list 3 4)) +;=>(1 2 3 4) +(concat (list 1 2) (list 3 4) (list 5 6)) +;=>(1 2 3 4 5 6) +(concat (concat)) +;=>() + + ;; Testing regular quote (quote 7) ;=>7 diff --git a/tests/step8_macros.mal b/tests/step8_macros.mal index 3f398d3..6564eae 100644 --- a/tests/step8_macros.mal +++ b/tests/step8_macros.mal @@ -1,25 +1,3 @@ -;; Testing cons function -(cons 1 (list)) -;=>(1) -(cons 1 (list 2)) -;=>(1 2) -(cons 1 (list 2 3)) -;=>(1 2 3) -(cons (list 1) (list 2 3)) -;=>((1) 2 3) - -;; Testing concat function -(concat) -;=>() -(concat (list 1 2)) -;=>(1 2) -(concat (list 1 2) (list 3 4)) -;=>(1 2 3 4) -(concat (list 1 2) (list 3 4) (list 5 6)) -;=>(1 2 3 4 5 6) -(concat (concat)) -;=>() - ;; Testing first function (first '()) ;=>nil |
