Browse Source

235829: test and fix: generic sigs and inner classes

tags/V1_6_1rc1
aclement 16 years ago
parent
commit
185d841fb8

+ 13
- 0
tests/bugs161/pr235829/Main.java View File

import java.lang.reflect.Type;

public class Main {
public static void main(String[]argv) throws Exception {
Class c = Class.forName("a.b.Adapter$1");
Type[] ts = c.getGenericInterfaces();
for (int i = 0; i < ts.length; i++) {
Type type = ts[i];
System.out.println(ts[i]);
}
}
}

+ 7
- 0
tests/bugs161/pr235829/a/Adapter.java View File

package a;

public interface Adapter<T> {
interface Setter<V> {}

public <V> Setter<V> makeSetter();
}

+ 9
- 0
tests/bugs161/pr235829/a/b/Adapter.java View File

package a.b;

public class Adapter<T> implements a.Adapter<T> {

public <V> Adapter.Setter<V> makeSetter() {
return new Adapter.Setter<V>() {};
}

}

+ 1
- 0
tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java View File

public class Ajc161Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public class Ajc161Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// AspectJ1.6.1 // AspectJ1.6.1
public void testCrazyGenericsInnerTypes_pr235829() { runTest("crazy generics and inner types");}
public void testAnnotationExposureGenerics_pr235597() { runTest("annotation exposure and generics");} public void testAnnotationExposureGenerics_pr235597() { runTest("annotation exposure and generics");}
public void testIncorrectRelationship_pr235204() { public void testIncorrectRelationship_pr235204() {
runTest("incorrect call relationship"); runTest("incorrect call relationship");

+ 6
- 0
tests/src/org/aspectj/systemtest/ajc161/ajc161.xml View File

<!-- AspectJ v1.6.1 Tests --> <!-- AspectJ v1.6.1 Tests -->
<suite> <suite>


<ajc-test dir="bugs161/pr235829" title="crazy generics and inner types">
<compile files="Main.java a/Adapter.java a/b/Adapter.java" options="-1.5"/>
<run class="Main"/>
</ajc-test>

<ajc-test dir="bugs161/pr235597" title="annotation exposure and generics"> <ajc-test dir="bugs161/pr235597" title="annotation exposure and generics">
<compile files="AnnotationTest1.java SomeAnnotation.java SomeAspect.java" options="-1.5"/> <compile files="AnnotationTest1.java SomeAnnotation.java SomeAspect.java" options="-1.5"/>
<run class="AnnotationTest1"> <run class="AnnotationTest1">

Loading…
Cancel
Save