Commit 33d5932 Paula Gearon
committed
1 parent 54e5625 commit 33d5932 Copy full SHA for 33d5932
File tree 1 file changed +15
-13
lines changed
1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change 35
35
(is (= (seq (apply array-map (make-kv-range 20 )))
36
36
(seq (apply ordered-map (make-kv-range 20 )))))))
37
37
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 )))))))
51
53
52
54
(deftest test-assoc
53
55
(testing " equivalence of maps constructed using assoc"
You can’t perform that action at this time.
0 commit comments