From defd29aeadb6fede0b40836b20266dadc1655d16 Mon Sep 17 00:00:00 2001 From: Tom Copeland Date: Wed, 2 Oct 2002 20:22:10 +0000 Subject: [PATCH] more refactoring. didn't really get anywhere, but everything still works git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1045 51baf565-9d33-0410-a72c-fc3788e3496d --- .../pmd/symboltable/SymbolTableTest.java | 59 ------------------- 1 file changed, 59 deletions(-) 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()); - } -*/ }