diff options
| author | Andrey Orst <andreyorst@gmail.com> | 2020-11-09 21:28:49 +0300 |
|---|---|---|
| committer | Andrey Orst <andreyorst@gmail.com> | 2020-11-09 21:28:49 +0300 |
| commit | aeab4d6df86538549f2f4a268b8addaad5ef267e (patch) | |
| tree | 243556debd71e86d2e5320edfeec253fd8c08760 /test/fn.fnl | |
| parent | 1f88cd3b8eadeab2518519a97683067ec777eb6e (diff) | |
feature(testing): change testing macro to contain description
Diffstat (limited to 'test/fn.fnl')
| -rw-r--r-- | test/fn.fnl | 70 |
1 files changed, 34 insertions, 36 deletions
diff --git a/test/fn.fnl b/test/fn.fnl index aae0382..f89581f 100644 --- a/test/fn.fnl +++ b/test/fn.fnl @@ -3,45 +3,43 @@ (require-macros :macros.fn) (deftest fn* - (when-meta - (testing fn*-meta - (fn* f - "docstring" - [x] x) - (assert-eq (meta f) {:fnl/docstring "docstring" - :fnl/arglist ["x"]}) + (testing "fn* meta" + (fn* f + "docstring" + [x] x) + (assert-eq (meta f) (when-meta {:fnl/docstring "docstring" + :fnl/arglist ["x"]})) - (fn* f - "docstring" - ([x] x)) - (assert-eq (meta f) {:fnl/docstring "docstring" - :fnl/arglist ["x"]}) + (fn* f + "docstring" + ([x] x)) + (assert-eq (meta f) (when-meta {:fnl/docstring "docstring" + :fnl/arglist ["x"]})) - (fn* f - "docstring" - ([x] x) - ([x y] (+ x y))) - (assert-eq (meta f) {:fnl/docstring "docstring" - :fnl/arglist ["\n [x]" - "\n [x y]"]}) + (fn* f + "docstring" + ([x] x) + ([x y] (+ x y))) + (assert-eq (meta f) (when-meta {:fnl/docstring "docstring" + :fnl/arglist ["\n [x]" + "\n [x y]"]})) - (fn* f - "docstring" - ([x] x) - ([x y] (+ x y)) - ([x y & z] (+ x y))) - (assert-eq (meta f) {:fnl/docstring "docstring" - :fnl/arglist ["\n [x]" - "\n [x y]" - "\n [x y & z]"]})))) + (fn* f + "docstring" + ([x] x) + ([x y] (+ x y)) + ([x y & z] (+ x y))) + (assert-eq (meta f) (when-meta {:fnl/docstring "docstring" + :fnl/arglist ["\n [x]" + "\n [x y]" + "\n [x y & z]"]})))) (deftest fn& - (when-meta - (testing fn&-meta - (fn& f "docstring" [x] x) - (assert-eq (meta f) {:fnl/docstring "docstring" - :fnl/arglist ["x"]}) + (testing "fn& meta" + (fn& f "docstring" [x] x) + (assert-eq (meta f) (when-meta {:fnl/docstring "docstring" + :fnl/arglist ["x"]})) - (fn& f "docstring" [...] [...]) - (assert-eq (meta f) {:fnl/docstring "docstring" - :fnl/arglist ["..."]})))) + (fn& f "docstring" [...] [...]) + (assert-eq (meta f) (when-meta {:fnl/docstring "docstring" + :fnl/arglist ["..."]})))) |