Skip to content
Browse files

Remove reflection warning in is-same-coll

  • Loading branch information...
1 parent 3f410c2 commit 0e0fa0563693dd7d1bd612032df91e740250f78d @michalmarczyk michalmarczyk committed Mar 2, 2014
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/test/clojure/clojure/data/avl_test.clj
View
10 src/test/clojure/clojure/data/avl_test.clj
@@ -45,9 +45,13 @@
(def even-numbers (apply avl/sorted-set (range 0 large-tree-size 2)))
(defn is-same-coll [a b]
- (let [msg (format "(class a)=%s (class b)=%s a=%s b=%s"
- (.getName (class a)) (.getName (class b)) a b)]
- (is (= (count a) (count b) (.size a) (.size b)) msg)
+ (let [msg (format "(class a)=%s (class b)=%s a=%s b=%s"
+ (.getName (class a)) (.getName (class b)) a b)
+ size (fn [x]
+ (if (map? x)
+ (.size ^java.util.Map x)
+ (.size ^java.util.Set x)))]
+ (is (= (count a) (count b) (size a) (size b)) msg)
(is (= a b) msg)
(is (= b a) msg)
(is (.equals ^Object a b) msg)

0 comments on commit 0e0fa05

Please sign in to comment.
Something went wrong with that request. Please try again.