aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/multiIncremental/pr253067/base/src/aa/AdvisesC.aj11
-rw-r--r--tests/multiIncremental/pr253067/base/src/aa/C.java13
-rw-r--r--tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java13
3 files changed, 37 insertions, 0 deletions
diff --git a/tests/multiIncremental/pr253067/base/src/aa/AdvisesC.aj b/tests/multiIncremental/pr253067/base/src/aa/AdvisesC.aj
new file mode 100644
index 000000000..219ddaedb
--- /dev/null
+++ b/tests/multiIncremental/pr253067/base/src/aa/AdvisesC.aj
@@ -0,0 +1,11 @@
+package aa;
+
+public aspect AdvisesC {
+ int C.nothing() {
+ return nothing();
+ }
+
+ before() : call(int C.nothing()) {
+
+ }
+}
diff --git a/tests/multiIncremental/pr253067/base/src/aa/C.java b/tests/multiIncremental/pr253067/base/src/aa/C.java
new file mode 100644
index 000000000..2a009e1e8
--- /dev/null
+++ b/tests/multiIncremental/pr253067/base/src/aa/C.java
@@ -0,0 +1,13 @@
+package aa;
+
+
+public class C {
+ public C() {
+ super();
+ System.out.println("init C");
+ }
+
+// int nothing() {
+// return nothing();
+// }
+ }
diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
index 6e7ef3dca..f3bd75376 100644
--- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
+++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
@@ -199,6 +199,19 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
// incomplete
}
+ public void testAdvisingCallJoinpointsInITDS_pr253067() {
+ String p = "pr253067";
+ initialiseProject(p);
+ build(p);
+ // Check for a code node at line 5 - if there is one then we created it correctly when building
+ // the advice relationship
+ IProgramElement root = getModelFor(p).getHierarchy().getRoot();
+ IProgramElement code = findElementAtLine(root, 5);
+ assertEquals("=pr253067<aa*AdvisesC.aj}AdvisesC)C.nothing?method-call(int aa.C.nothing())", code.getHandleIdentifier());
+ // dumptree(getModelFor(p).getHierarchy().getRoot(), 0);
+ // Ajc.dumpAJDEStructureModel(getModelFor("pr253067"), "after inc build where first advised line is gone");
+ }
+
public void testNullDelegateBrokenCode_pr251940() {
String p = "pr251940";
initialiseProject(p);