summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2017-09-25 22:31:36 -0700
committerAndy Clement <aclement@pivotal.io>2017-09-25 22:31:36 -0700
commitb1ce395b9b55c74f9a6db9787ed9b382d022d710 (patch)
treef09da0a680bf1d807ae3bc63edf821c25b128ed9
parenteae468d794cf215e05ec80d7be7d09a88e18ebe9 (diff)
downloadaspectj-b1ce395b9b55c74f9a6db9787ed9b382d022d710.tar.gz
aspectj-b1ce395b9b55c74f9a6db9787ed9b382d022d710.zip
testcode polish for 1.8.11V1_8_11RC1
-rw-r--r--tests/bugs1811/509235/parameterizedWithInner/Code.java20
-rw-r--r--tests/src/org/aspectj/systemtest/ajc1811/Ajc1811Tests.java66
2 files changed, 53 insertions, 33 deletions
diff --git a/tests/bugs1811/509235/parameterizedWithInner/Code.java b/tests/bugs1811/509235/parameterizedWithInner/Code.java
new file mode 100644
index 000000000..182a01d88
--- /dev/null
+++ b/tests/bugs1811/509235/parameterizedWithInner/Code.java
@@ -0,0 +1,20 @@
+public class Code {
+ public static void main(String []argv) {
+ }
+}
+
+class Outer<T> {
+ class Inner {
+ T t;
+ Inner(T t) {
+ this.t =t ;
+ }
+ }
+
+ public Inner m() {return null;}
+ public Outer<String>.Inner m2() {
+ Outer<String> os = new Outer<String>();
+ return os.new Inner("foo");
+ }
+ public Outer<?>.Inner m3() {return null;}
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc1811/Ajc1811Tests.java b/tests/src/org/aspectj/systemtest/ajc1811/Ajc1811Tests.java
index 0c6663692..f354bd9e4 100644
--- a/tests/src/org/aspectj/systemtest/ajc1811/Ajc1811Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc1811/Ajc1811Tests.java
@@ -29,40 +29,40 @@ import junit.framework.Test;
*/
public class Ajc1811Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
-// public void testParameterizedWithInner() throws Exception {
-// runTest("parameterized with inner");
-// JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "Outer");
-// assertNotNull(jc);
-// BcelWorld world = new BcelWorld(ajc.getSandboxDirectory().toString());
-//
-// ResolvedType outerType = world.resolve(UnresolvedType.forName("Outer"));
-// ResolvedMember m = findMethod(outerType,"m");
-//
-// UnresolvedType type = m.getReturnType();
-// assertEquals("LOuter$Inner;",type.getSignature());
-//
-// type = m.getGenericReturnType();
-// assertEquals("LOuter$Inner;",type.getSignature());
-//
-// ResolvedType resolvedType = world.resolve(type);
-// ResolvedType outerResolvedType = resolvedType.getOuterClass();
-// assertEquals("LOuter;",outerResolvedType.getSignature());
-//
-// ResolvedMember m2 = findMethod(outerType,"m2");
-// type = m2.getReturnType();
-// assertEquals("LOuter$Inner;",type.getSignature());
-//
-// type = m2.getGenericReturnType();
-// assertEquals("LOuter$Inner;",type.getSignature());
-//
-// // public Inner m() { ... }
-// Method m = findMethod(jc,"m");
-// System.out.println(m);
-// System.out.println(">"+m.getReturnType());
+ public void testParameterizedWithInner() throws Exception {
+ runTest("parameterized with inner");
+ JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "Outer");
+ assertNotNull(jc);
+ BcelWorld world = new BcelWorld(ajc.getSandboxDirectory().toString());
+
+ ResolvedType outerType = world.resolve(UnresolvedType.forName("Outer"));
+ ResolvedMember m = findMethod(outerType,"m");
+
+ UnresolvedType type = m.getReturnType();
+ assertEquals("LOuter$Inner;",type.getSignature());
+
+ type = m.getGenericReturnType();
+ assertEquals("LOuter$Inner;",type.getSignature());
+
+ ResolvedType resolvedType = world.resolve(type);
+ ResolvedType outerResolvedType = resolvedType.getOuterClass();
+ assertEquals("LOuter;",outerResolvedType.getSignature());
+
+ ResolvedMember m2 = findMethod(outerType,"m2");
+ type = m2.getReturnType();
+ assertEquals("LOuter$Inner;",type.getSignature());
+
+ type = m2.getGenericReturnType();
+ assertEquals("LOuter$Inner;",type.getSignature());
+
+ // public Inner m() { ... }
+ Method m3 = findMethod(jc,"m");
+ System.out.println(m3);
+ System.out.println(">"+m3.getReturnType());
// assertNotNull(returnType);
-//
-// // public Outer<String>.Inner m2() { ... }
-// }
+
+ // public Outer<String>.Inner m2() { ... }
+ }
//
// public void testMultiArgs_509235() {
// runTest("multiargs");