01: package test.net.sourceforge.pmd.ast;
02:
03: import net.sourceforge.pmd.PMD;
04: import net.sourceforge.pmd.ast.ASTInitializer;
05:
06: import org.junit.Test;
07:
08: import test.net.sourceforge.pmd.testframework.ParserTst;
09:
10: public class ASTInitializerTest extends ParserTst {
11:
12: @Test
13: public void testDontCrashOnBlockStatement() throws Throwable {
14: getNodes(ASTInitializer.class, TEST1);
15: }
16:
17: private static final String TEST1 = "public class Foo {" + PMD.EOL
18: + " {" + PMD.EOL + " x = 5;" + PMD.EOL + " }" + PMD.EOL
19: + "}";
20:
21: public static junit.framework.Test suite() {
22: return new junit.framework.JUnit4TestAdapter(
23: ASTInitializerTest.class);
24: }
25: }
|