summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Listopadov <andreyorst@gmail.com>2022-08-26 11:23:04 +0300
committerAndrey Listopadov <andreyorst@gmail.com>2022-08-26 11:23:04 +0300
commit4144a9ce6913fb371fd29a24bac96e94690dfbd1 (patch)
tree4554f0f4ba423e224244dde3c5f7be77da9cd8db
parentbb8b9054221607c62689d9507a02f91355132d89 (diff)
test for nils in vector
-rw-r--r--tests/core.fnl6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/core.fnl b/tests/core.fnl
index e550b4b..3c8dae0 100644
--- a/tests/core.fnl
+++ b/tests/core.fnl
@@ -70,6 +70,12 @@
(let [a {}]
(assert-eq (core.empty a) []))))
+(deftest vector-test
+ (testing "vecor can store nil elements"
+ (assert-eq 6 (core.count (core.vector nil nil nil nil nil nil)))
+ (assert-eq 6 (core.count (core.conj (core.vector nil nil nil nil nil) nil)))
+ (assert-eq 6 (core.count (core.pop (core.conj (core.vector nil nil nil nil nil nil) nil))))))
+
(deftest test-predicates
(testing "zero?"
(assert-is (core.zero? 0))