aboutsummaryrefslogtreecommitdiffstats
path: root/ajde/testsrc/org/aspectj
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-05-08 19:02:14 +0000
committerjhugunin <jhugunin>2003-05-08 19:02:14 +0000
commitdd62db936c6a9c22f04d4e1bc754b1f6bc15b64a (patch)
tree4a017698814768f0840716c5f86dbc10792b751a /ajde/testsrc/org/aspectj
parent81c05ad2acb34f3c3b59fbd5650f9780f464d45f (diff)
downloadaspectj-dd62db936c6a9c22f04d4e1bc754b1f6bc15b64a.tar.gz
aspectj-dd62db936c6a9c22f04d4e1bc754b1f6bc15b64a.zip
fixed testFileNodeFind that would always pass to be more strict
and then fixed the file it was operating on to be correct
Diffstat (limited to 'ajde/testsrc/org/aspectj')
-rw-r--r--ajde/testsrc/org/aspectj/ajde/StructureModelTest.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/ajde/testsrc/org/aspectj/ajde/StructureModelTest.java b/ajde/testsrc/org/aspectj/ajde/StructureModelTest.java
index 11babe0c5..23cfe4ffa 100644
--- a/ajde/testsrc/org/aspectj/ajde/StructureModelTest.java
+++ b/ajde/testsrc/org/aspectj/ajde/StructureModelTest.java
@@ -92,8 +92,10 @@ public class StructureModelTest extends AjdeTestCase {
public void testPointcutName() throws IOException {
File testFile = createFile("figures-coverage/figures/Main.java");
+ //System.err.println("PointcutName, testFile: " + testFile.getCanonicalPath() + " exists: " + testFile.exists());
StructureNode node = Ajde.getDefault().getStructureModelManager().getStructureModel().findRootNodeForSourceFile(
testFile.getCanonicalPath());
+ //System.err.println(" node: " + node);
assertTrue("find result", node != null) ;
ProgramElementNode pNode = (ProgramElementNode)((ProgramElementNode)node).getChildren().get(1);
ProgramElementNode pointcut = (ProgramElementNode)pNode.getChildren().get(0);
@@ -103,10 +105,13 @@ public class StructureModelTest extends AjdeTestCase {
}
public void testFileNodeFind() throws IOException {
- File testFile = createFile("testdata/examples/figures-coverage/figures/Main.java");
+ File testFile = createFile("figures-coverage/figures/Main.java");
+ //System.err.println("NodeFind, testFile: " + testFile.getCanonicalPath() + " exists: " + testFile.exists());
StructureNode node = Ajde.getDefault().getStructureModelManager().getStructureModel().findNodeForSourceLine(
testFile.getCanonicalPath(), 1);
+ //System.err.println(" node: " + node);
assertTrue("find result", node != null) ;
+ assertEquals("find result has children", 2, node.getChildren().size()) ;
ProgramElementNode pNode = (ProgramElementNode)node;
assertTrue("found node: " + pNode.getName(), pNode.getProgramElementKind().equals(ProgramElementNode.Kind.FILE_JAVA));
}