tweak
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@2532 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -26,28 +26,23 @@ public class IfElseStmtsMustUseBracesRuleTest extends SimpleAggregatorTst {
|
||||
}
|
||||
|
||||
private static final String TEST1 =
|
||||
"public class IfElseStmtsNeedBraces1 {" + PMD.EOL +
|
||||
"public class Foo {" + PMD.EOL +
|
||||
" public void foo() { " + PMD.EOL +
|
||||
" int x =0;" + PMD.EOL +
|
||||
" if (true == true) " + PMD.EOL +
|
||||
" x=2;" + PMD.EOL +
|
||||
" if (true) " + PMD.EOL +
|
||||
" y=2;" + PMD.EOL +
|
||||
" else " + PMD.EOL +
|
||||
" x=4;" + PMD.EOL +
|
||||
" }" + PMD.EOL +
|
||||
"}";
|
||||
|
||||
private static final String TEST2 =
|
||||
"public class IfElseStmtsNeedBraces2 {" + PMD.EOL +
|
||||
"public class Foo {" + PMD.EOL +
|
||||
" public void foo() { " + PMD.EOL +
|
||||
" int x =0;" + PMD.EOL +
|
||||
" if (true == true) {" + PMD.EOL +
|
||||
" if (true) {" + PMD.EOL +
|
||||
" x=2;" + PMD.EOL +
|
||||
" } else {" + PMD.EOL +
|
||||
" x=4;" + PMD.EOL +
|
||||
" }" + PMD.EOL +
|
||||
" }" + PMD.EOL +
|
||||
"}";
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user