Skip to content

Commit e22e9d6

Browse files
committed
Remove test for seq only being called once.
PR feedback was that this is not in fact testing seq is only called once due to seq returning itself when you call it multiple times so I dropped it.
1 parent 8e3552b commit e22e9d6

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

test/clojure/core_test/when_some.cljc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@
1818
(is (= '(0 1 2 3 4) (when-some [x (range 5)] x))))
1919
(testing "unlike when-let, we're looking for not-nil specifically, so false evaluates"
2020
(is (= false (when-some [x false] x))))
21-
(testing "seq is only called once"
22-
(let [calls (atom 0)
23-
seq-fn (fn s [] (lazy-seq
24-
(swap! calls inc)
25-
(cons 1 (s))))
26-
s (take 5 (seq-fn))]
27-
(is (= '(1 1 1 1 1) (when-some [x s] x)))
28-
(is (= @calls 5))))
2921
(testing "without a body, truth doesn't matter"
3022
(is (nil? (when-some [x nil])))
3123
(is (nil? (when-some [x [false]])))

0 commit comments

Comments
 (0)