Last active
March 29, 2017 09:33
-
-
Save 431824/a2f63ae9181c0104e66df7fe17641994 to your computer and use it in GitHub Desktop.
CodingStyle: divide assert from logic (GTW)
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
#Before | |
@Test | |
public void myTest() { | |
Foo foo = new Foo(); | |
test.apply(foo); | |
assertEquals(BigInteger.ONE, test.result()); | |
} | |
#After | |
@Test | |
public void myTest() { | |
Foo foo = new Foo(); | |
test.apply(foo); | |
assertEquals(BigInteger.ONE, test.result()); | |
} | |
Find: (^((?!assert).)*)\n([\s]{1,})assert | |
ReplaceWith: $1\n\n$3assert |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment