diff options
author | aclement <aclement> | 2005-10-20 13:54:50 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-10-20 13:54:50 +0000 |
commit | f06df41e4038bbde47a9934b240a3c064aa26099 (patch) | |
tree | c8a09896078815e11362a835fce6e4523072fa3e /tests | |
parent | e2b7b8b307e3fe03d8a329b08ffb9d8a0e4e6c27 (diff) | |
download | aspectj-f06df41e4038bbde47a9934b240a3c064aa26099.tar.gz aspectj-f06df41e4038bbde47a9934b240a3c064aa26099.zip |
test and fix for pr113073 from Helen
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs150/pr113073.java | 17 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java | 4 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 10 |
3 files changed, 31 insertions, 0 deletions
diff --git a/tests/bugs150/pr113073.java b/tests/bugs150/pr113073.java new file mode 100644 index 000000000..9e57ffaa9 --- /dev/null +++ b/tests/bugs150/pr113073.java @@ -0,0 +1,17 @@ +@interface Annotation{} +aspect B { + declare @method : public * C.anotherMethod(..) : @Annotation; // should be woven + declare @constructor : C.new(String) : @Annotation; +} + +class C { +} + +aspect D { + public C.new(String s) { + } + public void C.anotherMethod(String s) { + } + public void C.anotherMethod() { + } +} diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java index c2ac24822..a6f8acb46 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -618,6 +618,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void testVarArgsIITDInConstructor() { runTest("ITD varargs in constructor"); } + + public void testWeaveInfoMessageForDeclareAtMethodOnITDdMethod() { + runTest("weaveinfo message for declare at method on an ITDd method"); + } // helper methods..... diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index 4c43a907e..b4648155f 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -660,6 +660,16 @@ </compile> </ajc-test> + <ajc-test dir="bugs150" title="weaveinfo message for declare at method on an ITDd method"> + <compile files="pr113073.java" options="-1.5 -showWeaveInfo"> + <message kind="weave" text="Type 'C' (pr113073.java) has intertyped method from 'D' (pr113073.java:'void C.anotherMethod()')"/> + <message kind="weave" text="'public void C.anotherMethod()' (pr113073.java) is annotated with @Annotation method annotation from 'B' (pr113073.java:3)"/> + <message kind="weave" text="Type 'C' (pr113073.java) has intertyped method from 'D' (pr113073.java:'void C.anotherMethod(java.lang.String)')"/> + <message kind="weave" text="'public void C.anotherMethod(String)' (pr113073.java) is annotated with @Annotation method annotation from 'B' (pr113073.java:3)"/> + <message kind="weave" text="Type 'C' (pr113073.java) has intertyped constructor from 'D' (pr113073.java:'void C."/> + <message kind="weave" text="'public void C.new(String)' (pr113073.java) is annotated with @Annotation constructor annotation from 'B' (pr113073.java:4)"/> + </compile> + </ajc-test> <!-- ============================================================================ --> <!-- ============================================================================ --> |