2022-07-30 14:44:39 +00:00
|
|
|
{:deps {local/deps {:local/root "."}}
|
|
|
|
|
:paths ["src" "test"]
|
|
|
|
|
|
|
|
|
|
:tasks
|
2022-08-05 18:45:21 +00:00
|
|
|
{:requires ([clojure.string :as str])
|
|
|
|
|
|
|
|
|
|
:init
|
2022-07-30 14:44:39 +00:00
|
|
|
(do
|
|
|
|
|
(defn kaocha [alias args]
|
2022-08-05 18:45:21 +00:00
|
|
|
(apply shell "bin/kaocha" alias args))
|
|
|
|
|
|
|
|
|
|
(defn test-cljs [alias args]
|
|
|
|
|
(apply clojure (str/join ["-M:test:cljs-test-runner" alias]) args)))
|
2022-07-30 14:44:39 +00:00
|
|
|
|
2022-08-05 18:45:21 +00:00
|
|
|
test-clj-9
|
2022-07-30 14:44:39 +00:00
|
|
|
{:task (kaocha :clj-1-9 *command-line-args*)}
|
|
|
|
|
|
2022-08-05 18:45:21 +00:00
|
|
|
test-clj-10
|
2022-07-30 14:44:39 +00:00
|
|
|
{:task (kaocha :clj-1-10 *command-line-args*)}
|
|
|
|
|
|
2022-08-05 18:45:21 +00:00
|
|
|
test-clj-11
|
2022-07-30 14:44:39 +00:00
|
|
|
{:task (kaocha :clj-1-11 *command-line-args*)}
|
|
|
|
|
|
|
|
|
|
test-clj
|
2022-08-05 18:45:21 +00:00
|
|
|
{:depends [test-clj-9 test-clj-10 test-clj-11]}
|
|
|
|
|
|
|
|
|
|
test-cljs-9
|
|
|
|
|
{:task (test-cljs :clj-1-9 *command-line-args*)}
|
|
|
|
|
|
|
|
|
|
test-cljs-10
|
|
|
|
|
{:task (test-cljs :clj-1-10 *command-line-args*)}
|
|
|
|
|
|
|
|
|
|
test-cljs-11
|
|
|
|
|
{:task (test-cljs :clj-1-11 *command-line-args*)}
|
|
|
|
|
|
|
|
|
|
test-cljs
|
|
|
|
|
{:depends [#_test-cljs-9 test-cljs-10 test-cljs-11]}
|
2022-07-30 14:44:39 +00:00
|
|
|
|
|
|
|
|
test-bb
|
|
|
|
|
{:requires ([clojure.test :as t]
|
|
|
|
|
[net.cgrand.xforms-test])
|
|
|
|
|
:task (t/run-tests 'net.cgrand.xforms-test)}
|
|
|
|
|
|
2022-08-05 18:45:21 +00:00
|
|
|
test-all
|
|
|
|
|
{:depends [test-bb test-clj test-cljs]}
|
|
|
|
|
|
2022-07-30 14:44:39 +00:00
|
|
|
perf-bb
|
|
|
|
|
{:requires ([net.cgrand.xforms :as x])
|
|
|
|
|
:task
|
|
|
|
|
(let [n 10000
|
|
|
|
|
m (zipmap (range 100) (range))
|
|
|
|
|
mapping (map (fn [[k v]] [k (inc v)]))
|
|
|
|
|
xforing (x/for [[k v] _] [k (inc v)])]
|
|
|
|
|
(time (dotimes [_ n] (into {} mapping m)))
|
|
|
|
|
(time (dotimes [_ n] (into {} xforing m)))
|
|
|
|
|
(time (dotimes [_ n] (x/into {} xforing m))))}}}
|