Permalink
Browse files

Made test depend on Clojure version and check the correct thing.

  • Loading branch information...
1 parent c1fd891 commit 8d69735c46dcd386b1eba424a53cf6d6715e9550 @seancorfield seancorfield committed Feb 14, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/test/clojure/clojure/java/test_jmx.clj
@@ -168,9 +168,13 @@
AttributeList (class atts)
[5 4] (seq atts))))
+(def primitive-int? (< (.compareTo (clojure-version) "1.3.0") 0))
+
(deftest test-guess-attribute-typename
(are [x y] (= x (@#'jmx/guess-attribute-typename y))
- "long" 10
"boolean" false
"java.lang.String" "foo"
- "long" (Long/valueOf (long 10))))
+ "long" (Long/valueOf (long 10)))
+ (if primitive-int?
+ (is (= "int" (@#'jmx/guess-attribute-typename 10)))
+ (is (= "long" (@#'jmx/guess-attribute-typename 10)))))

0 comments on commit 8d69735

Please sign in to comment.