git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@2532 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2004-02-02 20:50:27 +00:00
parent 4b781d6c6c
commit 56a339de2f

View File

@ -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 +
"}";
}