summaryrefslogtreecommitdiff
path: root/macros_test.fnl
diff options
context:
space:
mode:
authorAndrey Orst <andreyorst@gmail.com>2020-11-02 09:17:03 +0300
committerAndrey Orst <andreyorst@gmail.com>2020-11-02 09:17:03 +0300
commite216b9be95e2c52f62e27294714ba6bb8fd58d1f (patch)
treecf590436b7f0cbfe70e4d15739004c2487bde2ab /macros_test.fnl
parent3b9aa01b8b82f8710eb19fc829b937af42d9dbcb (diff)
feature(core): more multimethod related functions
Diffstat (limited to 'macros_test.fnl')
-rw-r--r--macros_test.fnl4
1 files changed, 4 insertions, 0 deletions
diff --git a/macros_test.fnl b/macros_test.fnl
index 246b639..f8c72fa 100644
--- a/macros_test.fnl
+++ b/macros_test.fnl
@@ -68,6 +68,10 @@
(assert-eq (if-some [a nil] a :nothing) :nothing)))
(deftest multimethods
+ (testing defmulti
+ (defmulti x (fn [x] x))
+ (assert-eq (defmulti x (fn [x] (+ x 1))) nil))
+
(testing defmethod
(defmulti fac identity)
(defmethod fac 0 [_] 1)