From ef1a0b72af2532ae206fba6df845f9131d1f6876 Mon Sep 17 00:00:00 2001 From: Tom Copeland Date: Thu, 5 May 2005 22:03:10 +0000 Subject: [PATCH] test gardening git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@3473 51baf565-9d33-0410-a72c-fc3788e3496d --- .../pmd/symboltable/AcceptanceTest.java | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/pmd/regress/test/net/sourceforge/pmd/symboltable/AcceptanceTest.java b/pmd/regress/test/net/sourceforge/pmd/symboltable/AcceptanceTest.java index 0ffce2d3f2..2af294306e 100644 --- a/pmd/regress/test/net/sourceforge/pmd/symboltable/AcceptanceTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/symboltable/AcceptanceTest.java @@ -25,16 +25,11 @@ public class AcceptanceTest extends TestCase { } public void testInitializer() { - JavaParser parser = (new TargetJDK1_4()).createParser(new StringReader(TEST_NON_STATIC_INITIALIZER)); + JavaParser parser = (new TargetJDK1_4()).createParser(new StringReader(TEST_INITIALIZERS)); ASTCompilationUnit c = parser.CompilationUnit(); ASTInitializer a = (ASTInitializer)(c.findChildrenOfType(ASTInitializer.class)).get(0); assertFalse(a.isStatic()); - } - - public void testStaticInitializer() { - JavaParser parser = (new TargetJDK1_4()).createParser(new StringReader(TEST_STATIC_INITIALIZER)); - ASTCompilationUnit c = parser.CompilationUnit(); - ASTInitializer a = (ASTInitializer)(c.findChildrenOfType(ASTInitializer.class)).get(0); + a = (ASTInitializer)(c.findChildrenOfType(ASTInitializer.class)).get(1); assertTrue(a.isStatic()); } @@ -46,8 +41,6 @@ public class AcceptanceTest extends TestCase { ASTBlock a = (ASTBlock)(c.findChildrenOfType(ASTBlock.class)).get(1); Scope s = a.getScope(); System.out.println(s.getParent()); - - } private static final String TEST1 = @@ -59,13 +52,9 @@ public class AcceptanceTest extends TestCase { " }" + PMD.EOL + "}" + PMD.EOL; - private static final String TEST_NON_STATIC_INITIALIZER = + private static final String TEST_INITIALIZERS = "public class Foo {" + PMD.EOL + " {} " + PMD.EOL + - "}" + PMD.EOL; - - private static final String TEST_STATIC_INITIALIZER = - "public class Foo {" + PMD.EOL + " static {} " + PMD.EOL + "}" + PMD.EOL;