summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Halloway <stu@thinkrelevance.com>2011-05-13 14:23:08 -0400
committerStuart Halloway <stu@thinkrelevance.com>2011-05-13 14:23:08 -0400
commitf40af1052dcd365a057b0edae10029fabae88c9d (patch)
tree635cf09b1df20d848e05c17f6284059253239080
parent154c88ce1c9331c6c07afc623769347c62df456a (diff)
neuter overspecified tests
-rw-r--r--test/clojure/test_clojure/protocols.clj12
1 files changed, 4 insertions, 8 deletions
diff --git a/test/clojure/test_clojure/protocols.clj b/test/clojure/test_clojure/protocols.clj
index 917b8c5e..05965f5d 100644
--- a/test/clojure/test_clojure/protocols.clj
+++ b/test/clojure/test_clojure/protocols.clj
@@ -396,25 +396,21 @@
(is (= (RecordToTestLongHint. 42) (map->RecordToTestLongHint {:a 42})))
(is (= (RecordToTestLongHint. 42) (->RecordToTestLongHint 42)))
(testing "that invalid primitive types on hinted defrecord fields fails"
- (is (thrown-with-msg?
+ (is (thrown?
ClassCastException
- #"java.lang.String cannot be cast to java.lang.Long.*"
(read-string "#clojure.test_clojure.protocols.RecordToTestLongHint{:a \"\"}")))
(is (thrown-with-msg?
IllegalArgumentException
#"Unexpected param type, expected: long, given: java.lang.String.*"
(read-string "#clojure.test_clojure.protocols.RecordToTestLongHint[\"\"]")))
- (is (thrown-with-msg?
+ (is (thrown?
ClassCastException
- #"java.lang.String cannot be cast to java.lang.Long.*"
(clojure.test_clojure.protocols.RecordToTestLongHint/create {:a ""})))
- (is (thrown-with-msg?
+ (is (thrown?
ClassCastException
- #"java.lang.String cannot be cast to java.lang.Long.*"
(map->RecordToTestLongHint {:a ""})))
- (is (thrown-with-msg?
+ (is (thrown?
ClassCastException
- #"java.lang.String cannot be cast to java.lang.Number.*"
(->RecordToTestLongHint "")))))
(testing "that primitive hinting requiring coercion works as expected"
(is (= (RecordToTestByteHint. 42) (clojure.test_clojure.protocols.RecordToTestByteHint/create {:a (byte 42)})))