diff options
author | aclement <aclement> | 2010-04-19 22:19:17 +0000 |
---|---|---|
committer | aclement <aclement> | 2010-04-19 22:19:17 +0000 |
commit | e09e0b5f728c71dd2a06803f04eb566b53390004 (patch) | |
tree | 93b4e7a368cabd622af02eec21e006c9bd1c8298 /tests | |
parent | d97c25a05bf64f8c0c60e3efb6a7a1ce8a140531 (diff) | |
download | aspectj-e09e0b5f728c71dd2a06803f04eb566b53390004.tar.gz aspectj-e09e0b5f728c71dd2a06803f04eb566b53390004.zip |
309743
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs169/pr309743/A.java | 21 | ||||
-rw-r--r-- | tests/bugs169/pr309743/B.java | 23 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 4 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ataspectj/annotationgen.xml | 2 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java | 8 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc169/ajc169.xml | 18 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc169/transparentweaving.xml | 4 |
7 files changed, 75 insertions, 5 deletions
diff --git a/tests/bugs169/pr309743/A.java b/tests/bugs169/pr309743/A.java new file mode 100644 index 000000000..68bc77ca1 --- /dev/null +++ b/tests/bugs169/pr309743/A.java @@ -0,0 +1,21 @@ +import java.lang.reflect.*; +import java.lang.annotation.*; + +public class A { + public static void main(String []argv) throws Exception { + Method m = A.class.getDeclaredMethod("foo"); + printM(m); + } + + private static void printM(Method m) { + System.out.println(m.getName()); + Annotation[] as = m.getAnnotations(); + for (Annotation a: as) { + System.out.println(a); + } + } +} + +aspect X { + public void A.foo() {} +} diff --git a/tests/bugs169/pr309743/B.java b/tests/bugs169/pr309743/B.java new file mode 100644 index 000000000..fbc8b6019 --- /dev/null +++ b/tests/bugs169/pr309743/B.java @@ -0,0 +1,23 @@ +import java.lang.reflect.*; +import java.lang.annotation.*; + +public class B { + public static void main(String []argv) { + Field[] fs = B.class.getDeclaredFields(); + for (Field f: fs) { + printM(f); + } + } + + private static void printM(Field m) { + System.out.println(m.getName()); + Annotation[] as = m.getAnnotations(); + for (Annotation a: as) { + System.out.println(a); + } + } +} + +aspect X { + public int B.boo; +} diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index aed668c07..34f4e1658 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -366,7 +366,7 @@ </ajc-test> <ajc-test dir="java5/reflection" title="reflection on itds"> - <compile files="InterTypeDeclarations.aj,ReflectOnCodeStyleITDs.java" options="-1.5 -Xlint:ignore"></compile> + <compile files="InterTypeDeclarations.aj,ReflectOnCodeStyleITDs.java" options="-1.5 -Xlint:ignore -makeAjReflectable"></compile> <run class="ReflectOnCodeStyleITDs" classpath="../lib/bcel/bcel.jar"> <stdout> <line text="public C.new(int, int, int)"/> @@ -431,7 +431,7 @@ <ajc-test dir="java5/reflection" pr="114322" title="reflection on abstract ITDs (Billing example)"> - <compile files="ReflectBilling.java,Billing.aj" options="-1.5"/> + <compile files="ReflectBilling.java,Billing.aj" options="-1.5 -makeAjReflectable"/> <run class="ReflectBilling"> <stdout> <line text="public void Customer.addCharge(long)"/> diff --git a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/annotationgen.xml b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/annotationgen.xml index c42dbb642..3a8bda2ad 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/annotationgen.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/annotationgen.xml @@ -180,7 +180,7 @@ </ajc-test> <ajc-test dir="java5/ataspectj/annotationGen" title="ann gen for itds"> - <compile files="ITDTest.aj" options="-1.5, -outxml -Xlint:ignore"> + <compile files="ITDTest.aj" options="-1.5, -outxml -Xlint:ignore -makeAjReflectable"> </compile> <run class="a.b.c.ITDTest" ltw=""/> </ajc-test> diff --git a/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java b/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java index 5c5cea505..be42a3e9d 100644 --- a/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java @@ -30,6 +30,14 @@ public class Ajc169Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // runTest("advising privileged access method"); // } + public void testItdMarkerAnnotations_309743() { + runTest("itd marker annotations - 1"); + } + + public void testItdMarkerAnnotations_309743_2() { + runTest("itd marker annotations - 2"); + } + public void testPipeliningAndGenerics_309336() { runTest("pipelining and generics"); } diff --git a/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml b/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml index 5e907f731..0b0fe443e 100644 --- a/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml +++ b/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml @@ -2,6 +2,24 @@ <suite> + <ajc-test dir="bugs169/pr309743" title="itd marker annotations - 1"> + <compile files="A.java" options="-1.5"/> + <run class="A"> + <stdout> + <line text="foo"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs169/pr309743" title="itd marker annotations - 2"> + <compile files="B.java" options="-1.5"/> + <run class="B"> + <stdout> + <line text="boo"/> + </stdout> + </run> + </ajc-test> + <ajc-test dir="bugs169/pr309336" title="pipelining and generics"> <compile files="NoSystemStreams.aj UseOperators.java Operators.java" options="-1.5"> <message kind="warning" text="No system.out"/> diff --git a/tests/src/org/aspectj/systemtest/ajc169/transparentweaving.xml b/tests/src/org/aspectj/systemtest/ajc169/transparentweaving.xml index 10351bdc4..4eb5f6d37 100644 --- a/tests/src/org/aspectj/systemtest/ajc169/transparentweaving.xml +++ b/tests/src/org/aspectj/systemtest/ajc169/transparentweaving.xml @@ -48,11 +48,11 @@ </ajc-test> <ajc-test dir="features169/transparent" title="declare at on private itd"> - <compile files="OneDeclareAt.java" options="-1.5"/> + <compile files="OneDeclareAt.java" options="-1.5 -makeAjReflectable"/> </ajc-test> <ajc-test dir="features169/transparent" title="declare at two"> - <compile files="DeclareAtTwo.java" options="-1.5"/> + <compile files="DeclareAtTwo.java" options="-1.5 -makeAjReflectable"/> </ajc-test> <ajc-test dir="features169/transparent" title="three"> |