Created
November 22, 2012 07:47
-
-
Save moznion/4129859 to your computer and use it in GitHub Desktop.
Hook AssertionError by groovy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private shouldAssertionError(Closure c) { | |
| try { | |
| c.call(); | |
| fail ("Error"); | |
| } catch (AssertionError expected) { | |
| assert true; // Successful | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
こんなコードいらん!!!!
shouldFail でおk