diff options
author | Andy Clement <aclement@gopivotal.com> | 2013-10-01 10:00:14 -0700 |
---|---|---|
committer | Andy Clement <aclement@gopivotal.com> | 2013-10-18 11:36:29 -0700 |
commit | 2314eaf48a35a249e63fae12151ce926ea98c97c (patch) | |
tree | 27fb10ca8254958b652f22e8adf229c506fb1e47 /tests/src/org | |
parent | aba10968da43b517e68308e14681a14311a76d42 (diff) | |
download | aspectj-2314eaf48a35a249e63fae12151ce926ea98c97c.tar.gz aspectj-2314eaf48a35a249e63fae12151ce926ea98c97c.zip |
418129: annos on top most implementor method
Diffstat (limited to 'tests/src/org')
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc174/Ajc174Tests.java | 16 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc174/ajc174.xml | 61 |
2 files changed, 77 insertions, 0 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc174/Ajc174Tests.java b/tests/src/org/aspectj/systemtest/ajc174/Ajc174Tests.java index 06af6a53b..1e300dd0a 100644 --- a/tests/src/org/aspectj/systemtest/ajc174/Ajc174Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc174/Ajc174Tests.java @@ -21,6 +21,22 @@ import org.aspectj.testing.XMLBasedAjcTestCase; */ public class Ajc174Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + public void testAnnotatedItd_418129() throws Exception { + runTest("annotated itd"); + } + + public void testAnnotatedItd_418129_2() throws Exception { + runTest("annotated itd 2"); + } + + public void testAnnotatedItd_418129_3() throws Exception { + runTest("annotated itd 3"); + } + + public void testAnnotatedItd_418129_4() throws Exception { + runTest("annotated itd 4"); + } + public void testSuperItdCtor_413378() throws Exception { runTest("super itd ctor"); } diff --git a/tests/src/org/aspectj/systemtest/ajc174/ajc174.xml b/tests/src/org/aspectj/systemtest/ajc174/ajc174.xml index 85ff2af8b..5b47cf4d3 100644 --- a/tests/src/org/aspectj/systemtest/ajc174/ajc174.xml +++ b/tests/src/org/aspectj/systemtest/ajc174/ajc174.xml @@ -2,6 +2,67 @@ <suite> + <ajc-test dir="bugs174/pr418129" title="annotated itd"> + <compile files="Target.java" options="-1.5 -showWeaveInfo"> + <message kind="weave" text="Type 'Behavior' (Target.java) has intertyped method from 'Trait' (Target.java:'java.lang.String Behavior.hello()')"/> + <message kind="weave" text="Type 'Target' (Target.java) has intertyped method from 'Trait' (Target.java:'java.lang.String Behavior.hello()')"/> + <message kind="weave" text="'public java.lang.String Target.hello()' (Target.java) is annotated with @Tagged method annotation from 'Target$A' (Target.java:18)"/> + </compile> + <run class="Target"> + <stdout> + <line text="@Tagged()"/> + </stdout> + </run> + </ajc-test> + + <!-- declared with throws exception --> + <ajc-test dir="bugs174/pr418129" title="annotated itd 2"> + <compile files="Target2.java" options="-1.5 -showWeaveInfo"> + <message kind="weave" text="Type 'Behavior' (Target2.java) has intertyped method from 'Trait' (Target2.java:'java.lang.String Behavior.hello()')"/> + <message kind="weave" text="Type 'Target2' (Target2.java) has intertyped method from 'Trait' (Target2.java:'java.lang.String Behavior.hello()')"/> + <message kind="weave" text="'public java.lang.String Target2.hello()' (Target2.java) is annotated with @Tagged method annotation from 'Target2$A' (Target2.java:18)"/> + </compile> + <run class="Target2"> + <stdout> + <line text="@Tagged()"/> + </stdout> + </run> + </ajc-test> + + <!-- already annotated with another annotation --> + <ajc-test dir="bugs174/pr418129" title="annotated itd 3"> + <compile files="Target3.java" options="-1.5 -showWeaveInfo"> + <message kind="weave" text="Type 'Behavior' (Target3.java) has intertyped method from 'Trait' (Target3.java:'java.lang.String Behavior.hello()')"/> + <message kind="weave" text="Type 'Target3' (Target3.java) has intertyped method from 'Trait' (Target3.java:'java.lang.String Behavior.hello()')"/> + <message kind="weave" text="'public java.lang.String Target3.hello()' (Target3.java) is annotated with @Tagged method annotation from 'Target3$A' (Target3.java:16)"/> + </compile> + <run class="Target3"> + <stdout> + <line text="2"/> + <line text="@Wibble()"/> + <line text="@Tagged()"/> + </stdout> + </run> + </ajc-test> + + <!-- already annotated with the same annotation --> + <ajc-test dir="bugs174/pr418129" title="annotated itd 4"> + <compile files="Target4.java" options="-1.5 -showWeaveInfo"> + <message kind="weave" text="Type 'Behavior' (Target4.java) has intertyped method from 'Trait' (Target4.java:'java.lang.String Behavior.hello()')"/> + <message kind="weave" text="Type 'Target4' (Target4.java) has intertyped method from 'Trait' (Target4.java:'java.lang.String Behavior.hello()')"/> + <!-- warning turned off as it gets confusing - when the itd on the interface is hit by a deca --> + <!-- + <message kind="warning" text="java.lang.String Target4.hello() - already has an annotation of type Tagged, cannot add a second instance [Xlint:elementAlreadyAnnotated]"/> + --> + </compile> + <run class="Target4"> + <stdout> + <line text="1"/> + <line text="@Tagged(value=31)"/> + </stdout> + </run> + </ajc-test> + <ajc-test dir="bugs174/pr413378" title="super itd ctor"> <compile files="Code.java" options="-1.5 -showWeaveInfo"> <message kind="weave" text="Type 'Child' (Code.java) has intertyped constructor from 'MyTest' (Code.java:'void Child.<init>(java.lang.String, int)')"/> |