diff options
| author | Joel Martin <github@martintribe.org> | 2014-04-17 21:49:07 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2014-04-17 21:49:07 -0500 |
| commit | db4c329aff4621e05b92a55be4f18173f5a4f655 (patch) | |
| tree | 92baaa6d88246e509cfd6a7d03d8fab997e0b935 /tests | |
| parent | 8cb5cda46cf3aef847ae3926dc53a5e5f87fe261 (diff) | |
| download | mal-db4c329aff4621e05b92a55be4f18173f5a4f655.tar.gz mal-db4c329aff4621e05b92a55be4f18173f5a4f655.zip | |
All: perf test, Makefile refactor, add *host-language*
Other:
- bash,make,postscript: quasiquote of vectors
- Fix Java slurp
- add time function to core.mal
- switches on *host-language* for make time-secs vs time-ms
- Ignore */experiments directories
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/perf1.mal | 10 | ||||
| -rw-r--r-- | tests/perf2.mal | 12 | ||||
| -rw-r--r-- | tests/step7_quote.mal | 6 |
3 files changed, 28 insertions, 0 deletions
diff --git a/tests/perf1.mal b/tests/perf1.mal new file mode 100644 index 0000000..871e28f --- /dev/null +++ b/tests/perf1.mal @@ -0,0 +1,10 @@ +(load-file "../core.mal") + +;;(prn "Start: basic macros performance test") + +(time (do + (or false nil false nil false nil false nil false nil 4) + (cond false 1 nil 2 false 3 nil 4 false 5 nil 6 "else" 7) + (-> (list 1 2 3 4 5 6 7 8 9) rest rest rest rest rest rest first))) + +;;(prn "Done: basic macros performance test") diff --git a/tests/perf2.mal b/tests/perf2.mal new file mode 100644 index 0000000..3889191 --- /dev/null +++ b/tests/perf2.mal @@ -0,0 +1,12 @@ +(load-file "../core.mal") + +;;(prn "Start: basic math/recursion test") + +(def! sumdown (fn* (N) (if (> N 0) (+ N (sumdown (- N 1))) 0))) +(def! fib (fn* (N) (if (= N 0) 1 (if (= N 1) 1 (+ (fib (- N 1)) (fib (- N 2))))))) + +(time (do + (sumdown 10) + (fib 12))) + +;;(prn "Done: basic math/recursion test") diff --git a/tests/step7_quote.mal b/tests/step7_quote.mal index c41c7e2..9166065 100644 --- a/tests/step7_quote.mal +++ b/tests/step7_quote.mal @@ -47,6 +47,9 @@ ;=>(1 b 3) `(1 ~b 3) ;=>(1 (1 "b" "d") 3) +;;; TODO: fix this +;;;`[1 ~b 3] +;;;;=>[1 (1 "b" "d") 3] ;; Testing splice-unquote @@ -56,6 +59,9 @@ ;=>(1 c 3) `(1 ~@c 3) ;=>(1 1 "b" "d" 3) +;;; TODO: fix this +;;;`[1 ~@c 3] +;;;;=>[1 1 "b" "d" 3] ;; Testing symbol equality |
