summaryrefslogtreecommitdiff
path: root/macros_test.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'macros_test.fnl')
-rw-r--r--macros_test.fnl11
1 files changed, 8 insertions, 3 deletions
diff --git a/macros_test.fnl b/macros_test.fnl
index b8556e8..3ed5ad1 100644
--- a/macros_test.fnl
+++ b/macros_test.fnl
@@ -94,16 +94,21 @@
(deftest def-macros
(testing def
- (def a 10)
+ (def {:dynamic true} a 10)
(assert-eq a 10)
+ (set a 20)
+ (assert-eq a 20)
(def a {})
(assert-eq a {})
(def a.b 10)
(assert-eq a.b 10)
- (assert-eq b 10))
+ (assert-eq b 10)
+ (def :dynamic c 10)
+ (set c 15)
+ (assert-eq c 15))
(testing defonce
- (defonce a 10)
+ (defonce {:dynamic true} a 10)
(assert-eq a 10)
(defonce a {})
(assert-eq a 10)