diff options
author | aclement <aclement> | 2009-01-21 00:12:57 +0000 |
---|---|---|
committer | aclement <aclement> | 2009-01-21 00:12:57 +0000 |
commit | fee0a3644bfcf03362953fd098962ce88f494d86 (patch) | |
tree | 2d70098974488c4d56792faeee3f718c60514f88 | |
parent | 405805d07619bc3538552ea49f9aca9da2e58875 (diff) | |
download | aspectj-fee0a3644bfcf03362953fd098962ce88f494d86.tar.gz aspectj-fee0a3644bfcf03362953fd098962ce88f494d86.zip |
261380: test and fix
-rw-r--r-- | tests/multiIncremental/261380/base/src/test/C.java | 15 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java | 13 |
2 files changed, 28 insertions, 0 deletions
diff --git a/tests/multiIncremental/261380/base/src/test/C.java b/tests/multiIncremental/261380/base/src/test/C.java new file mode 100644 index 000000000..a7feb0ab8 --- /dev/null +++ b/tests/multiIncremental/261380/base/src/test/C.java @@ -0,0 +1,15 @@ +package test; + +public class C { + public C() { + new C(); + } + +// public static void main(String[] args) { +// new C(); +// } +} + +aspect X { + before () : call(public *..C.new()) {} +} diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java index 639b54ec0..74710c1c5 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java @@ -70,6 +70,19 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa } assertEquals("Should have found the two types in: " + ps, 2, count); } + + public void testConstructorAdvice_pr261380() throws Exception { + String p = "261380"; + initialiseProject(p); + build(p); + IRelationshipMap irm = getModelFor(p).getRelationshipMap(); + IRelationship ir = (IRelationship)irm.get("=261380<test{C.java}X&before").get(0); + List targets = ir.getTargets(); + assertEquals(1,targets.size()); + System.out.println(targets.get(0)); + String handle = (String) targets.get(0); + assertEquals("Expected the handle for the code node inside the constructor decl","=261380<test{C.java[C~C?constructor-call(void test.C.<init>())",handle); + } /* * A.aj package pack; public aspect A { pointcut p() : call( C.method before() : p() { // line 7 } } |