diff options
author | Stuart Halloway <stu@thinkrelevance.com> | 2010-06-01 22:31:08 -0400 |
---|---|---|
committer | Stuart Halloway <stu@thinkrelevance.com> | 2010-10-11 09:20:50 -0400 |
commit | 35d94446d50a05b08f0bb88c61bae44c49c74eb6 (patch) | |
tree | e13e01cdc53fa4804bc5f35bdc355f9e9fdcce48 | |
parent | 2230a91829f39b72973e6fecf275d9c664911ca0 (diff) |
regression test for dynamic class reload #368
Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
-rw-r--r-- | test/clojure/test_clojure/def.clj | 12 |
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))))))) |