From: aclement Date: Fri, 22 Aug 2008 22:09:18 +0000 (+0000) Subject: 176905: test and fix X-Git-Tag: V162DEV_M1~58 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7aef243f67f9cdcac4bc6abc5eadb59a9f9700c6;p=aspectj.git 176905: test and fix --- diff --git a/tests/bugs162/pr176905/ChainedItd.aj b/tests/bugs162/pr176905/ChainedItd.aj new file mode 100644 index 000000000..441cf7057 --- /dev/null +++ b/tests/bugs162/pr176905/ChainedItd.aj @@ -0,0 +1,24 @@ +import java.lang.reflect.Field; +import java.lang.annotation.*; + +public aspect ChainedItd { + declare @field: long *.foo: @Deprecated; + + declare @field: @Deprecated * *.foo: @MyAnnotation; + //uncomment the line below to prove our test should work + //declare @field: long *.foo: @MyAnnotation; + + public static void main(String argz[]) throws Exception { + Field idField = Test.class.getDeclaredField("foo"); + idField.setAccessible(true); + assert idField.getAnnotation(MyAnnotation.class) != null; + } +} + +class Test { + private long foo; +} + +@Retention(RetentionPolicy.RUNTIME) +@interface MyAnnotation { +} diff --git a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java index 7ef61767c..fd750f5b1 100644 --- a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java @@ -19,6 +19,8 @@ import org.aspectj.testing.XMLBasedAjcTestCase; public class Ajc162Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // AspectJ1.6.2 +// public void testAdvisingInterfaces_pr163005() { runTest("advising joinpoints in interfaces"); } + public void testChainedItds_pr176905() { runTest("chained itds"); } 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"); } diff --git a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml index 6011429b9..e7f4cd270 100644 --- a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml +++ b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml @@ -2,6 +2,21 @@ + + + + + + + + + + + + + + + @@ -10,7 +25,6 @@ -