summaryrefslogtreecommitdiff
path: root/tests/fn.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fn.fnl')
-rw-r--r--tests/fn.fnl40
1 files changed, 20 insertions, 20 deletions
diff --git a/tests/fn.fnl b/tests/fn.fnl
index 3517918..36fd395 100644
--- a/tests/fn.fnl
+++ b/tests/fn.fnl
@@ -7,56 +7,56 @@
"docstring"
[x] x)
(assert-eq (meta f)
- (when-meta {:fnl/docstring "docstring"
- :fnl/arglist ["([x])"]}))
+ {:fnl/docstring "docstring"
+ :fnl/arglist ["([x])"]})
(fn* f
"docstring"
[])
(assert-eq (meta f)
- (when-meta {:fnl/docstring "docstring"
- :fnl/arglist ["([])"]}))
+ {:fnl/docstring "docstring"
+ :fnl/arglist ["([])"]})
(fn* f
"docstring"
([x] x))
(assert-eq (meta f)
- (when-meta {:fnl/docstring "docstring"
- :fnl/arglist ["([x])"]}))
+ {:fnl/docstring "docstring"
+ :fnl/arglist ["([x])"]})
(fn* f
"docstring"
([x] x)
([x y] (+ x y)))
(assert-eq (meta f)
- (when-meta {:fnl/docstring "docstring"
- :fnl/arglist ["([x])"
- "([x y])"]}))
+ {:fnl/docstring "docstring"
+ :fnl/arglist ["([x])"
+ "([x y])"]})
(fn* f
"docstring"
([])
([x y] (+ x y)))
(assert-eq (meta f)
- (when-meta {:fnl/docstring "docstring"
- :fnl/arglist ["([])"
- "([x y])"]}))
+ {:fnl/docstring "docstring"
+ :fnl/arglist ["([])"
+ "([x y])"]})
(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 ["([x])"
- "([x y])"
- "([x y & z])"]})))
+ {:fnl/docstring "docstring"
+ :fnl/arglist ["([x])"
+ "([x y])"
+ "([x y & z])"]}))
(testing "fn* doc destructuring"
(fn* f [[a b c]])
(assert-eq (meta f)
- (when-meta {:fnl/arglist ["([[a b c]])"]}))
+ {:fnl/arglist ["([[a b c]])"]})
(fn* f ([[a b c]]) ([{: a}]) ([[{:a [a b c]}]]))
(assert-eq (meta f)
- (when-meta {:fnl/arglist ["([[a b c]])"
- "([{:a a}])"
- "([[{:a [a b c]}]])"]})))
+ {:fnl/arglist ["([[a b c]])"
+ "([{:a a}])"
+ "([[{:a [a b c]}]])"]}))
(testing "fn* methods"
(local ns {:a 1 :b 2})