Browse Source

309743

tags/V1_6_9M2
aclement 14 years ago
parent
commit
e09e0b5f72

+ 21
- 0
tests/bugs169/pr309743/A.java View File

@@ -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() {}
}

+ 23
- 0
tests/bugs169/pr309743/B.java View File

@@ -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;
}

+ 2
- 2
tests/src/org/aspectj/systemtest/ajc150/ajc150.xml View File

@@ -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)"/>

+ 1
- 1
tests/src/org/aspectj/systemtest/ajc150/ataspectj/annotationgen.xml View File

@@ -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>

+ 8
- 0
tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java View File

@@ -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");
}

+ 18
- 0
tests/src/org/aspectj/systemtest/ajc169/ajc169.xml View File

@@ -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"/>

+ 2
- 2
tests/src/org/aspectj/systemtest/ajc169/transparentweaving.xml View File

@@ -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">

Loading…
Cancel
Save