diff options
| author | Andrey Orst <andreyorst@gmail.com> | 2020-11-08 22:02:54 +0300 |
|---|---|---|
| committer | Andrey Orst <andreyorst@gmail.com> | 2020-11-08 22:02:54 +0300 |
| commit | 35bcc0ab3ac754e9f2ce6465c3d5c060bd5d37aa (patch) | |
| tree | 5a8c925c5a3b1ac8a5eab7bb4c516039d0dd09a7 /test/macros.fnl | |
| parent | 910bfcf768c2305a6885b0d1f491561d09ebd9ca (diff) | |
feature(core): add metadata based type inspection for tables, and empty macro
Diffstat (limited to 'test/macros.fnl')
| -rw-r--r-- | test/macros.fnl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/macros.fnl b/test/macros.fnl index 638a29d..53de853 100644 --- a/test/macros.fnl +++ b/test/macros.fnl @@ -135,3 +135,10 @@ (assert-eq (meta x) (when-meta {:fnl/docstring "x"})) (defonce {:doc "y" :dynamic true} y 20) (assert-eq (meta y) (when-meta {:fnl/docstring "y"})))) + +(deftest empty + (testing empty + (assert-eq (empty {}) {}) + (assert-eq (empty []) {}) + (assert-eq (getmetatable (empty [])) {:cljlib/table-type :seq}) + (assert-eq (getmetatable (empty {})) {:cljlib/table-type :table}))) |