summaryrefslogtreecommitdiff
path: root/test/core.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'test/core.fnl')
-rw-r--r--test/core.fnl9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/core.fnl b/test/core.fnl
index 0609788..54b2d00 100644
--- a/test/core.fnl
+++ b/test/core.fnl
@@ -4,6 +4,7 @@
(local
{: vec
+ : hash-map
: apply
: seq
: first
@@ -599,3 +600,11 @@
(assert-eq (vec 1) [1])
(assert-eq (vec 1 2 3) [1 2 3])
(assert-eq (getmetatable (vec 1 2 3)) {:cljlib/table-type :seq})))
+
+(deftest hash-map
+ (testing hash-map
+ (assert* (not (pcall hash-map :a)))
+ (assert-eq (hash-map) {})
+ (assert-eq (hash-map :a 1) {:a 1})
+ (assert-eq (hash-map :a 1 :b 2 :c 3) {:a 1 :b 2 :c 3})
+ (assert-eq (getmetatable (hash-map)) {:cljlib/table-type :table})))