diff options
| author | Andrey Orst <andreyorst@gmail.com> | 2020-11-13 23:04:25 +0300 |
|---|---|---|
| committer | Andrey Orst <andreyorst@gmail.com> | 2020-11-13 23:04:25 +0300 |
| commit | e4dd661631e109e8f0eab3ab0ce117464acde7a0 (patch) | |
| tree | 82e8ef079a7455e9dfbcada1aa135ad1ab9f24e8 /tests | |
| parent | 1b309ac016d806d2f9b44540ed5020f5c60c4256 (diff) | |
fix(core): revert fn* to defn change
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/core.fnl | 4 | ||||
| -rw-r--r-- | tests/fn.fnl | 12 | ||||
| -rw-r--r-- | tests/macros.fnl | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/tests/core.fnl b/tests/core.fnl index ae7b3b4..f7dccd7 100644 --- a/tests/core.fnl +++ b/tests/core.fnl @@ -208,7 +208,7 @@ (assert-eq (table.concat (mapv string.upper "vaiv")) "VAIV")) (testing "reduce" - (defn add + (fn* add ([] 0) ([a] a) ([a b] (+ a b)) @@ -340,7 +340,7 @@ (assert* ((complement #(= $1 $2)) 1 2))) (testing "apply" - (defn add + (fn* add ([x] x) ([x y] (+ x y)) ([x y & zs] diff --git a/tests/fn.fnl b/tests/fn.fnl index c7a3aa9..e0af7cb 100644 --- a/tests/fn.fnl +++ b/tests/fn.fnl @@ -1,21 +1,21 @@ (require-macros :tests.test) (require-macros :cljlib-macros) -(deftest defn - (testing "defn meta" - (defn f +(deftest fn* + (testing "fn* meta" + (fn* f "docstring" [x] x) (assert-eq (meta f) (when-meta {:fnl/docstring "docstring" :fnl/arglist ["x"]})) - (defn f + (fn* f "docstring" ([x] x)) (assert-eq (meta f) (when-meta {:fnl/docstring "docstring" :fnl/arglist ["x"]})) - (defn f + (fn* f "docstring" ([x] x) ([x y] (+ x y))) @@ -23,7 +23,7 @@ :fnl/arglist ["\n [x]" "\n [x y]"]})) - (defn f + (fn* f "docstring" ([x] x) ([x y] (+ x y)) diff --git a/tests/macros.fnl b/tests/macros.fnl index 402e42d..a9b41fe 100644 --- a/tests/macros.fnl +++ b/tests/macros.fnl @@ -133,7 +133,7 @@ (assert-eq (meta g) (when-meta {:fnl/docstring "documentation"}))) (testing "defmulti with multiple arity" - (defmulti f (defn ([x] x) ([x y] [x y]))) + (defmulti f (fn* ([x] x) ([x y] [x y]))) (defmethod f :default ([_] :def) ([_ _] :def2)) (defmethod f :4 ([x] (.. x :2))) (defmethod f [:4 :2] ([x y] 42)) |