File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
test/clojure/test_clojure Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 396396 (is (= (RecordToTestLongHint. 42 ) (map->RecordToTestLongHint {:a 42 })))
397397 (is (= (RecordToTestLongHint. 42 ) (->RecordToTestLongHint 42 )))
398398 (testing " that invalid primitive types on hinted defrecord fields fails"
399- (is (thrown-with-msg ?
399+ (is (thrown?
400400 ClassCastException
401- #"java.lang.String cannot be cast to java.lang.Long.*"
402401 (read-string " #clojure.test_clojure.protocols.RecordToTestLongHint{:a \"\" }" )))
403402 (is (thrown-with-msg?
404403 IllegalArgumentException
405404 #"Unexpected param type, expected: long, given: java.lang.String.*"
406405 (read-string " #clojure.test_clojure.protocols.RecordToTestLongHint[\"\" ]" )))
407- (is (thrown-with-msg ?
406+ (is (thrown?
408407 ClassCastException
409- #"java.lang.String cannot be cast to java.lang.Long.*"
410408 (clojure.test_clojure.protocols.RecordToTestLongHint/create {:a " " })))
411- (is (thrown-with-msg ?
409+ (is (thrown?
412410 ClassCastException
413- #"java.lang.String cannot be cast to java.lang.Long.*"
414411 (map->RecordToTestLongHint {:a " " })))
415- (is (thrown-with-msg ?
412+ (is (thrown?
416413 ClassCastException
417- #"java.lang.String cannot be cast to java.lang.Number.*"
418414 (->RecordToTestLongHint " " )))))
419415 (testing " that primitive hinting requiring coercion works as expected"
420416 (is (= (RecordToTestByteHint. 42 ) (clojure.test_clojure.protocols.RecordToTestByteHint/create {:a (byte 42 )})))
You can’t perform that action at this time.
0 commit comments