summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Halloway <stu@thinkrelevance.com>2010-06-01 22:31:08 -0400
committerStuart Halloway <stu@thinkrelevance.com>2010-10-11 09:20:50 -0400
commit35d94446d50a05b08f0bb88c61bae44c49c74eb6 (patch)
treee13e01cdc53fa4804bc5f35bdc355f9e9fdcce48
parent2230a91829f39b72973e6fecf275d9c664911ca0 (diff)
regression test for dynamic class reload #368
Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
-rw-r--r--test/clojure/test_clojure/def.clj12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/clojure/test_clojure/def.clj b/test/clojure/test_clojure/def.clj
index 950f2a68..3207ff43 100644
--- a/test/clojure/test_clojure/def.clj
+++ b/test/clojure/test_clojure/def.clj
@@ -14,3 +14,15 @@
(testing "bad arglist forms"
(is (fails-with-cause? IllegalArgumentException '#"Parameter declaration arg1 should be a vector"
(eval-in-temp-ns (defn foo (arg1 arg2)))))))
+
+(deftest dynamic-redefinition
+ ;; too many contextual things for this kind of caching to work...
+ (testing "classes are never cached, even if their bodies are the same"
+ (is (= :b
+ (eval
+ '(do
+ (defmacro my-macro [] :a)
+ (defn do-macro [] (my-macro))
+ (defmacro my-macro [] :b)
+ (defn do-macro [] (my-macro))
+ (do-macro)))))))