diff --git a/pmd/regress/test/net/sourceforge/pmd/symboltable/SymbolTableTest.java b/pmd/regress/test/net/sourceforge/pmd/symboltable/SymbolTableTest.java index 3ace41d846..ce44efd450 100644 --- a/pmd/regress/test/net/sourceforge/pmd/symboltable/SymbolTableTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/symboltable/SymbolTableTest.java @@ -37,63 +37,4 @@ public class SymbolTableTest extends TestCase { s.add(scope); assertEquals(scope, s.get(0)); } -/* - public void testAdd() { - SymbolTable s = new SymbolTable(); - s.addDeclaration(NameDeclarationTest.FOO); - try { - s.addDeclaration(NameDeclarationTest.FOO); - } catch (RuntimeException e) { - return; // cool - } - throw new RuntimeException("Should have thrown RuntimeException"); - } - - public void testParentContains() { - SymbolTable table = new SymbolTable(); - table.openScope(new LocalScope()); - table.addDeclaration(new NameDeclaration(NameDeclarationTest.createNode("bar", 12), Kind.UNKNOWN)); - table.addDeclaration(new NameDeclaration(NameDeclarationTest.createNode("baz", 12), Kind.UNKNOWN)); - assertTrue(table.getUnusedNameDeclarations().hasNext()); - table.leaveScope(); - assertTrue(!table.getUnusedNameDeclarations().hasNext()); - } - - public void testRecordUsage() { - SymbolTable s = new SymbolTable(); - s.addDeclaration(NameDeclarationTest.FOO); - assertTrue(s.getUnusedNameDeclarations().hasNext()); - s.lookup(new NameOccurrence(NameDeclarationTest.FOO_NODE)); - assertTrue(!s.getUnusedNameDeclarations().hasNext()); - } - - public void testRecordOccurrence() { - SymbolTable table = new SymbolTable(); - table.openScope(new LocalScope()); - table.lookup(new NameOccurrence(NameDeclarationTest.FOO_NODE)); - assertTrue(!table.getUnusedNameDeclarations().hasNext()); - } - - public void testRecordOccurrence2() { - SymbolTable s = new SymbolTable(); - s.lookup(new NameOccurrence(NameDeclarationTest.FOO_NODE)); - assertTrue(!s.getUnusedNameDeclarations().hasNext()); - } - - public void testRecordUsageParent() { - SymbolTable parent = new SymbolTable(); - parent.addDeclaration(NameDeclarationTest.FOO); - parent.openScope(new LocalScope()); - parent.leaveScope(); - assertEquals(NameDeclarationTest.FOO, parent.getUnusedNameDeclarations().next()); - } - - public void testRecordUsageParent2() { - SymbolTable parent = new SymbolTable(); - parent.addDeclaration(NameDeclarationTest.FOO); - parent.openScope(new LocalScope()); - parent.lookup(new NameOccurrence(NameDeclarationTest.FOO_NODE)); - assertTrue(!parent.getUnusedNameDeclarations().hasNext()); - } -*/ }