diff options
author | aclement <aclement> | 2009-01-06 22:05:57 +0000 |
---|---|---|
committer | aclement <aclement> | 2009-01-06 22:05:57 +0000 |
commit | f6debc480abf456cab312a3538bb8c9430f9d6e2 (patch) | |
tree | e839d44973af7322ac1995789f87c5968ef3f4b6 /ajde.core | |
parent | 04fb46c3c1192dd13d74f6d2234095bfc460dfa1 (diff) | |
download | aspectj-f6debc480abf456cab312a3538bb8c9430f9d6e2.tar.gz aspectj-f6debc480abf456cab312a3538bb8c9430f9d6e2.zip |
258206: package declaration support in the model
Diffstat (limited to 'ajde.core')
-rw-r--r-- | ajde.core/testsrc/org/aspectj/ajde/core/tests/model/StructureModelTests.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ajde.core/testsrc/org/aspectj/ajde/core/tests/model/StructureModelTests.java b/ajde.core/testsrc/org/aspectj/ajde/core/tests/model/StructureModelTests.java index f2980e141..249b9615a 100644 --- a/ajde.core/testsrc/org/aspectj/ajde/core/tests/model/StructureModelTests.java +++ b/ajde.core/testsrc/org/aspectj/ajde/core/tests/model/StructureModelTests.java @@ -56,7 +56,7 @@ public class StructureModelTests extends AjdeCoreTestCase { File testFile = openFile("figures" + File.separator + "Figure.java"); IProgramElement node = manager.getHierarchy().findElementForSourceFile(testFile.getAbsolutePath()); assertTrue("find result", node != null); - String child = ((IProgramElement) node.getChildren().get(1)).getName(); + String child = ((IProgramElement) node.getChildren().get(2)).getName(); assertTrue("expected Figure got child " + child, child.equals("Figure")); } @@ -64,7 +64,8 @@ public class StructureModelTests extends AjdeCoreTestCase { File testFile = openFile("figures" + File.separator + "Main.java"); IProgramElement node = manager.getHierarchy().findElementForSourceFile(testFile.getAbsolutePath()); assertTrue("find result", node != null); - IProgramElement pNode = (IProgramElement) (node).getChildren().get(2); + IProgramElement pNode = (IProgramElement) (node).getChildren().get(3); + assertEquals(IProgramElement.Kind.ASPECT,pNode.getKind()); IProgramElement pointcut = (IProgramElement) pNode.getChildren().get(0); assertTrue("kind", pointcut.getKind().equals(IProgramElement.Kind.POINTCUT)); assertTrue("found node: " + pointcut.getName(), pointcut.toLabelString().equals("testptct()")); @@ -78,7 +79,7 @@ public class StructureModelTests extends AjdeCoreTestCase { IProgramElement node = manager.getHierarchy().findElementForSourceLine(testFile.getAbsolutePath(), 1); assertTrue("find result", node != null); - assertEquals("find result has children", 3, node.getChildren().size()); + assertEquals("find result has children", 4, node.getChildren().size()); // package, import and 2 types assertTrue("found node: " + node.getName(), node.getKind().equals(IProgramElement.Kind.FILE_JAVA)); } |