Skip to content

Commit 33d5932

Browse files
author
Paula Gearon
committed
Restricted iterator tests to JVM
1 parent 54e5625 commit 33d5932

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

test/tiara/data_test.cljc

+15-13
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,21 @@
3535
(is (= (seq (apply array-map (make-kv-range 20)))
3636
(seq (apply ordered-map (make-kv-range 20)))))))
3737

38-
(defn- drain-iterable
39-
"Similar to iterator-seq, without chunking"
40-
[i]
41-
(let [^java.util.Iterator it (.iterator ^Iterable i)]
42-
(loop [v []]
43-
(if (.hasNext it)
44-
(recur (conj v (.next it)))
45-
v))))
46-
47-
(deftest test-iterable
48-
(testing "Testing the iterable interface"
49-
(is (= [] (drain-iterable (ordered-map))))
50-
(is (= [[:a 1] [:b 2]] (drain-iterable (ordered-map :a 1 :b 2))))))
38+
#?(:clj
39+
(defn- drain-iterable
40+
"Similar to iterator-seq, without chunking"
41+
[i]
42+
(let [^java.util.Iterator it (.iterator ^Iterable i)]
43+
(loop [v []]
44+
(if (.hasNext it)
45+
(recur (conj v (.next it)))
46+
v)))))
47+
48+
#?(:clj
49+
(deftest test-iterable
50+
(testing "Testing the iterable interface"
51+
(is (= [] (drain-iterable (ordered-map))))
52+
(is (= [[:a 1] [:b 2]] (drain-iterable (ordered-map :a 1 :b 2)))))))
5153

5254
(deftest test-assoc
5355
(testing "equivalence of maps constructed using assoc"

0 commit comments

Comments
 (0)