diff options
author | aclement <aclement> | 2008-08-22 21:07:25 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-08-22 21:07:25 +0000 |
commit | fbac9e5426de8b2a2cbd4408e812dd34648a6a10 (patch) | |
tree | 08d8691fa0d45f2ef37bfded14a66615e31cef24 /tests | |
parent | 36df743803c35f9715f4c0c5cffa79989a672992 (diff) | |
download | aspectj-fbac9e5426de8b2a2cbd4408e812dd34648a6a10.tar.gz aspectj-fbac9e5426de8b2a2cbd4408e812dd34648a6a10.zip |
198341: test and fix
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs162/pr198341/AnnotationAspect.java | 30 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java | 1 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc162/ajc162.xml | 7 |
3 files changed, 38 insertions, 0 deletions
diff --git a/tests/bugs162/pr198341/AnnotationAspect.java b/tests/bugs162/pr198341/AnnotationAspect.java new file mode 100644 index 000000000..a67c2641b --- /dev/null +++ b/tests/bugs162/pr198341/AnnotationAspect.java @@ -0,0 +1,30 @@ +import java.lang.annotation.*; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +@interface TestAnnotation1 {} + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +@interface TestAnnotation2{} + +@TestAnnotation1 +class Annotated {} + +interface Marker {} + +public aspect AnnotationAspect { + + declare @type: @TestAnnotation1 *: @TestAnnotation2; + + // of cource this matches + // declare parents: (@TestAnnotation1 *) implements Marker; + // this matches, too + // declare parents: (@TestAnnotation2 *) implements Marker; + + // this does not match on Annotated + declare parents: (@TestAnnotation2 *) && !java.lang.annotation.Annotation implements Marker; + // but this does match on annotated + // declare parents: (@TestAnnotation1 *) && !java.lang.annotation.Annotation implements Marker; +} + diff --git a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java index d1c914be3..7ef61767c 100644 --- a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java @@ -19,6 +19,7 @@ import org.aspectj.testing.XMLBasedAjcTestCase; public class Ajc162Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // AspectJ1.6.2 + public void testDecAtAnnoDecP_pr198341() { runTest("dec atanno and decp"); } // public void testStarInAnnoStyle_pr209951() { runTest("asterisk in at aj pointcut"); } public void testMissingMarkers_pr197720() { runTest("missing markers on inherited annotated method"); } public void testLostGenericsSigOnItd_pr211146() { runTest("lost generic sig on itd"); } diff --git a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml index a25c904d7..6011429b9 100644 --- a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml +++ b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml @@ -3,6 +3,13 @@ <!-- AspectJ v1.6.2 Tests --> <suite> + <ajc-test dir="bugs162/pr198341" title="dec atanno and decp"> + <compile options="-1.5 -showWeaveInfo" files="AnnotationAspect.java"> + <message kind="weave" text="'Annotated' (AnnotationAspect.java:12) is annotated with @TestAnnotation2 type annotation from 'AnnotationAspect' (AnnotationAspect.java:18)"/> + <message kind="weave" text="Extending interface set for type 'Annotated' (AnnotationAspect.java) to include 'Marker' (AnnotationAspect.java)"/> + </compile> + </ajc-test> + <ajc-test dir="bugs162/pr209051" title="asterisk in at aj pointcut"> <compile options="-1.5" files="Bug.java"/> |