Skip to content

Commit f582358

Browse files
committed
add tests for infinite seqs
1 parent 8250322 commit f582358

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/clojure/core_test/seq.cljc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@
2727
(is (= input-map (into {} (seq input-map))))))
2828
(testing "nonseqables"
2929
(is (thrown? IllegalArgumentException (seq 1)))
30-
(is (thrown? IllegalArgumentException (seq (fn []))))))
30+
(is (thrown? IllegalArgumentException (seq (fn [])))))
31+
(testing "infinite sequences are produced by seq"
32+
(let [infinite-seq (seq (range))]
33+
(is (seq? infinite-seq))
34+
(is (= (range 10000) (take 10000 infinite-seq))))))

0 commit comments

Comments
 (0)