diff options
| author | Andrey Orst <andreyorst@gmail.com> | 2020-11-21 10:14:09 +0000 |
|---|---|---|
| committer | Andrey Orst <andreyorst@gmail.com> | 2020-11-21 10:14:09 +0000 |
| commit | cbe6c9345514a6373a1c28f77b320cbe228c7c5e (patch) | |
| tree | b81e0e4ba4778e8734e6069ece4d6097df1431e0 /tests/test.fnl | |
| parent | dc7f076d4bd433c9857944cb2f756b0f07bc3db6 (diff) | |
| parent | 0c4f5d25977c20bdc18fb193bb28c43b22641dc6 (diff) | |
Merge branch 'set-fixes' into 'master'
fix: improved set support
See merge request andreyorst/fennel-cljlib!7
Diffstat (limited to 'tests/test.fnl')
| -rw-r--r-- | tests/test.fnl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test.fnl b/tests/test.fnl index b250af4..0fcd750 100644 --- a/tests/test.fnl +++ b/tests/test.fnl @@ -6,7 +6,9 @@ This function is able to compare tables of any depth, even if one of the tables uses tables as keys." `(fn eq# [left# right#] - (if (and (= (type left#) :table) (= (type right#) :table)) + (if (= left# right#) + true + (and (= (type left#) :table) (= (type right#) :table)) (let [oldmeta# (getmetatable right#)] ;; In case if we'll get something like ;; (eq {[1 2 3] {:a [1 2 3]}} {[1 2 3] {:a [1 2 3]}}) @@ -29,7 +31,7 @@ the tables uses tables as keys." (set res# (= count-a# count-b#))) (setmetatable right# oldmeta#) res#) - (= left# right#)))) + false))) (fn test.assert-eq [expr1 expr2 msg] |