From 85912c0c33cca3501b4746f162f7ebb61f1fe952 Mon Sep 17 00:00:00 2001 From: Tom Copeland Date: Wed, 2 Oct 2002 14:59:45 +0000 Subject: [PATCH] more refactoring of symbol table. getting nicer all the time... and more tests, too.... git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1042 51baf565-9d33-0410-a72c-fc3788e3496d --- .../pmd/symboltable/ScopeTest.java | 41 ------------------- 1 file changed, 41 deletions(-) delete mode 100644 pmd/regress/test/net/sourceforge/pmd/symboltable/ScopeTest.java diff --git a/pmd/regress/test/net/sourceforge/pmd/symboltable/ScopeTest.java b/pmd/regress/test/net/sourceforge/pmd/symboltable/ScopeTest.java deleted file mode 100644 index 85ec42fc40..0000000000 --- a/pmd/regress/test/net/sourceforge/pmd/symboltable/ScopeTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * User: tom - * Date: Oct 1, 2002 - * Time: 3:24:28 PM - */ -package test.net.sourceforge.pmd.symboltable; - -import junit.framework.TestCase; -import net.sourceforge.pmd.symboltable.Scope; -import net.sourceforge.pmd.symboltable.NameDeclaration; -import net.sourceforge.pmd.symboltable.Kind; -import net.sourceforge.pmd.symboltable.NameOccurrence; - -public class ScopeTest extends TestCase { - - public void testAdd() { - Scope scope = new Scope(); - scope.addDeclaration(new NameDeclaration(NameDeclarationTest.FOO_NODE, Kind.LOCAL_VARIABLE)); - assertTrue(scope.contains(new NameOccurrence(NameDeclarationTest.createNode("foo", 12)))); - } - - public void testUnused() { - Scope scope = new Scope(); - scope.addDeclaration(new NameDeclaration(NameDeclarationTest.FOO_NODE, Kind.LOCAL_VARIABLE)); - assertTrue(scope.getUnusedDeclarations().hasNext()); - } - - public void testUnused2() { - Scope scope = new Scope(); - scope.addDeclaration(new NameDeclaration(NameDeclarationTest.FOO_NODE, Kind.LOCAL_VARIABLE)); - scope.addOccurrence(new NameOccurrence(NameDeclarationTest.createNode("foo", 12))); - assertTrue(!scope.getUnusedDeclarations().hasNext()); - } - - public void testUnused3() { - Scope scope = new Scope(); - scope.addDeclaration(new NameDeclaration(NameDeclarationTest.FOO_NODE, Kind.LOCAL_VARIABLE)); - scope.addOccurrence(new NameOccurrence(NameDeclarationTest.createNode("foo.toString()", 12))); - assertTrue(!scope.getUnusedDeclarations().hasNext()); - } -}