Skip to content

Commit

Permalink
Avoid reflection in assert-throws macro.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcgrana committed Dec 6, 2009
1 parent 04a849b commit 7474501
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/clj_unit/core_assertions.clj
Expand Up @@ -91,7 +91,7 @@
~form
(failure "Expecting throw, got none")
(catch ~klass e#
(let [e-message# (.getMessage e#)]
(let [e-message# (.getMessage #^Exception e#)]
(assert-truth (or (not ~message-re) (re-match? ~message-re e-message#))
(format "Expected message matching \"%s\" got \"%s\""
~message-re e-message#))))
Expand Down

0 comments on commit 7474501

Please sign in to comment.