Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

specialize annotation tests by specification version

  • Loading branch information...
commit fcc3d799cc33c920720fa512b18901e2f2a81dda 1 parent 1d4dbe2
@stuarthalloway stuarthalloway authored
View
19 test/clojure/test_clojure/annotations.clj
@@ -11,19 +11,8 @@
(ns clojure.test-clojure.annotations
(:use clojure.test))
-(defn vm-has-ws-annotations?
- "Does the vm have the ws annotations we use to test some
- annotation features. If not, fall back to Java 5 tests."
- []
- (try
- (doseq [n ["javax.xml.ws.soap.Addressing"
- "javax.xml.ws.WebServiceRef"
- "javax.xml.ws.WebServiceRefs"]]
- (Class/forName n))
- true
- (catch ClassNotFoundException e
- false)))
+(case (System/getProperty "java.specification.version")
+ "1.5" (load "annotations/java_5")
+ "1.6" (load "annotations/java_6")
+ nil)
-(if (vm-has-ws-annotations?)
- (load "annotations/java_6_and_later")
- (load "annotations/java_5"))
View
0  ...ure/test_clojure/annotations/java_6_and_later.clj → test/clojure/test_clojure/annotations/java_6.clj
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.