From 0c4f5d25977c20bdc18fb193bb28c43b22641dc6 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Sat, 21 Nov 2020 10:14:09 +0000 Subject: fix: update ordered when removing items. WIP: for unordered set --- tests/test.fnl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/test.fnl') 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] -- cgit v1.2.3