Skip to content

Commit 45e1c79

Browse files
authored
Re-enable mapcat tests for Basilisp (#845)
1 parent db35f8f commit 45e1c79

1 file changed

Lines changed: 4 additions & 14 deletions

File tree

test/clojure/core_test/mapcat.cljc

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,8 @@
1818
(is (= [1 1 2 2 3 3] (transduce (mapcat #(repeat 2 %)) conj [] [1 2 3]))))
1919
(testing "into with transducer"
2020
(is (= [0 0 1 1 2 2] (into [] (mapcat #(repeat 2 %)) (range 3)))))
21-
;; The test case below causes Basilisp to enter an infinite loop.
22-
;; https://github.com/jank-lang/clojure-test-suite/issues/844
23-
;; https://github.com/basilisp-lang/basilisp/issues/1300
24-
#?@(:lpy []
25-
:default
26-
[(testing "infinite input laziness"
27-
(is (= [0 0 1 1 2] (take 5 (mapcat #(repeat 2 %) (range))))))])
21+
(testing "infinite input laziness"
22+
(is (= [0 0 1 1 2] (take 5 (mapcat #(repeat 2 %) (range))))))
2823
(testing "empty collection input"
2924
(is (= [] (mapcat identity []))))
3025
(testing "single element producing empty sequence"
@@ -42,13 +37,8 @@
4237
(is (= [2 2 4 4 6 6] (mapcat (fn [x y] [(* 2 x) (* 2 y)]) [1 2 3] [1 2 3]))))
4338
(testing "one collection shorter than the other"
4439
(is (= [2 4] (mapcat (fn [x y] [(* x y)]) [1 2] [2 2 2]))))
45-
;; The test case below causes Basilisp to enter an infinite loop.
46-
;; https://github.com/jank-lang/clojure-test-suite/issues/844
47-
;; https://github.com/basilisp-lang/basilisp/issues/1300
48-
#?@(:lpy []
49-
:default
50-
[(testing "works lazily on infinite input"
51-
(is (= [0 1 2 3 4 5] (->> (mapcat (fn [x] [x]) (range)) (take 6)))))])
40+
(testing "works lazily on infinite input"
41+
(is (= [0 1 2 3 4 5] (->> (mapcat (fn [x] [x]) (range)) (take 6)))))
5242
(testing "function sometimes returns []"
5343
(is (= [1 3 5] (mapcat #(if (odd? %) [%] []) (range 1 6)))))
5444
(testing "function sometimes returns nil"

0 commit comments

Comments
 (0)