From db4c329aff4621e05b92a55be4f18173f5a4f655 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Thu, 17 Apr 2014 21:49:07 -0500 Subject: 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 --- tests/perf1.mal | 10 ++++++++++ tests/perf2.mal | 12 ++++++++++++ tests/step7_quote.mal | 6 ++++++ 3 files changed, 28 insertions(+) create mode 100644 tests/perf1.mal create mode 100644 tests/perf2.mal (limited to 'tests') 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 -- cgit v1.2.3