|
18 | 18 | (is (= [1 1 2 2 3 3] (transduce (mapcat #(repeat 2 %)) conj [] [1 2 3])))) |
19 | 19 | (testing "into with transducer" |
20 | 20 | (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)))))) |
28 | 23 | (testing "empty collection input" |
29 | 24 | (is (= [] (mapcat identity [])))) |
30 | 25 | (testing "single element producing empty sequence" |
|
42 | 37 | (is (= [2 2 4 4 6 6] (mapcat (fn [x y] [(* 2 x) (* 2 y)]) [1 2 3] [1 2 3])))) |
43 | 38 | (testing "one collection shorter than the other" |
44 | 39 | (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))))) |
52 | 42 | (testing "function sometimes returns []" |
53 | 43 | (is (= [1 3 5] (mapcat #(if (odd? %) [%] []) (range 1 6))))) |
54 | 44 | (testing "function sometimes returns nil" |
|
0 commit comments