aboutsummaryrefslogtreecommitdiff
path: root/src/clojure/contrib/test_clojure/java_interop.clj
diff options
context:
space:
mode:
authorFrantisek Sodomka <fsodomka@gmail.com>2009-05-27 11:29:30 +0000
committerFrantisek Sodomka <fsodomka@gmail.com>2009-05-27 11:29:30 +0000
commit391898ad586671a635d17ce5def9f098d250394d (patch)
tree7ab635d28e74d3374b7224e2da660237323bdeb8 /src/clojure/contrib/test_clojure/java_interop.clj
parent64ab3234411e73defdeda12722c911aa8461d178 (diff)
test-clojure: added compilation.clj, macros.clj, metadata.clj;
compilation: compiler metadata; java-interop: dot, double-dot, doto; vars: regression in binding
Diffstat (limited to 'src/clojure/contrib/test_clojure/java_interop.clj')
-rw-r--r--src/clojure/contrib/test_clojure/java_interop.clj22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/clojure/contrib/test_clojure/java_interop.clj b/src/clojure/contrib/test_clojure/java_interop.clj
index 5384dcc8..346a6e7f 100644
--- a/src/clojure/contrib/test_clojure/java_interop.clj
+++ b/src/clojure/contrib/test_clojure/java_interop.clj
@@ -16,6 +16,23 @@
; . ..
; doto
+(deftest test-dot
+ (are (= _1 _2)
+ (. Integer MAX_VALUE) Integer/MAX_VALUE
+ (. Integer MAX_VALUE) java.lang.Integer/MAX_VALUE ))
+
+(deftest test-double-dot
+ (is (= (.. System (getProperties) (get "os.name"))
+ (. (. System (getProperties)) (get "os.name")))))
+
+(deftest test-doto
+ (let [doto-map (doto (new java.util.HashMap)
+ (.put "a" 1)
+ (.put "b" 2))]
+ (is (= (class doto-map) java.util.HashMap))
+ (is (= doto-map {"a" 1 "b" 2}))))
+
+
; new
; instance?
@@ -26,8 +43,6 @@
; bean
; proxy, proxy-super
-; gen-class, gen-interface
-; compile
; bases, supers
@@ -41,6 +56,3 @@
; Coercions: int, long, float, double, char, boolean, short, byte
; num
; ints/longs/floats/doubles
-
-; Simple XML Support: xml/parse
-