From 4c2093ec83a1b7cba25791761d3bdcdaf0d4bba9 Mon Sep 17 00:00:00 2001 From: Andrei Kleschinski Date: Fri, 1 Mar 2013 19:24:01 +0300 Subject: [PATCH 2/2] CLJ-1169 fix unit-tests --- test/clojure/test_clojure/control.clj | 2 +- test/clojure/test_clojure/def.clj | 8 ++++---- test/clojure/test_clojure/errors.clj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/clojure/test_clojure/control.clj b/test/clojure/test_clojure/control.clj index 3a7d4c3..204e994 100644 --- a/test/clojure/test_clojure/control.clj +++ b/test/clojure/test_clojure/control.clj @@ -358,7 +358,7 @@ :a (char 97))) (testing "test error on duplicate test constants" (is (thrown-with-msg? - IllegalArgumentException + clojure.lang.Compiler$CompilerException #"Duplicate case test constant: 1" (eval `(case 0 1 :x 1 :y))))) (testing "test correct behaviour on Number truncation" diff --git a/test/clojure/test_clojure/def.clj b/test/clojure/test_clojure/def.clj index 99b3d5d..c251b32 100644 --- a/test/clojure/test_clojure/def.clj +++ b/test/clojure/test_clojure/def.clj @@ -14,13 +14,13 @@ (testing "multiarity syntax invalid parameter declaration" (is (fails-with-cause? IllegalArgumentException - #"Parameter declaration arg1 should be a vector" + #"Parameter declaration \"arg1\" should be a vector" (eval-in-temp-ns (defn foo (arg1 arg2)))))) (testing "multiarity syntax invalid signature" (is (fails-with-cause? IllegalArgumentException - #"Invalid signature \[a b\] should be a list" + #"Invalid signature \"\[a b\]\" should be a list" (eval-in-temp-ns (defn foo ([a] 1) [a b]))))) @@ -28,7 +28,7 @@ (testing "assume single arity syntax" (is (fails-with-cause? IllegalArgumentException - #"Parameter declaration a should be a vector" + #"Parameter declaration \"a\" should be a vector" (eval-in-temp-ns (defn foo a))))) (testing "bad name" @@ -49,7 +49,7 @@ (testing "don't allow interleaved map" (is (fails-with-cause? IllegalArgumentException - #"Invalid signature \{:a :b\} should be a list" + #"Invalid signature \"\{:a :b\}\" should be a list" (eval-in-temp-ns (defn a "asdf" ([a] 1) {:a :b} ([] 1))))))) (deftest dynamic-redefinition diff --git a/test/clojure/test_clojure/errors.clj b/test/clojure/test_clojure/errors.clj index 98cab48..be89e3f 100644 --- a/test/clojure/test_clojure/errors.clj +++ b/test/clojure/test_clojure/errors.clj @@ -42,7 +42,7 @@ ["let .* in %s:\\d+" '(let [a])] ["let .* in %s:\\d+" '(let (a))] ["renamed-with-open .* in %s:\\d+" '(renamed-with-open [a])]]] - (is (thrown-with-msg? IllegalArgumentException + (is (thrown-with-msg? clojure.lang.Compiler$CompilerException (re-pattern (format msg-regex-str *ns*)) (macroexpand form))))) -- 1.7.7.1.msysgit.0