aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/org/aspectj/systemtest/ajc1811
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2016-12-16 15:47:37 -0800
committerAndy Clement <aclement@pivotal.io>2016-12-16 15:47:37 -0800
commitab4df7e110b0a4ddfc9cc1ec1653d3433c9605c4 (patch)
treed0b53279c531d2674041050e0a0510cd0f4c34a6 /tests/src/org/aspectj/systemtest/ajc1811
parent8e079ecde2315294e16de8304899d19acdd15c36 (diff)
downloadaspectj-ab4df7e110b0a4ddfc9cc1ec1653d3433c9605c4.tar.gz
aspectj-ab4df7e110b0a4ddfc9cc1ec1653d3433c9605c4.zip
1.8.11 test setup and wip tests
Diffstat (limited to 'tests/src/org/aspectj/systemtest/ajc1811')
-rw-r--r--tests/src/org/aspectj/systemtest/ajc1811/Ajc1811Tests.java86
-rw-r--r--tests/src/org/aspectj/systemtest/ajc1811/AllTestsAspectJ1811.java25
-rw-r--r--tests/src/org/aspectj/systemtest/ajc1811/ajc1811.xml29
3 files changed, 140 insertions, 0 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc1811/Ajc1811Tests.java b/tests/src/org/aspectj/systemtest/ajc1811/Ajc1811Tests.java
new file mode 100644
index 000000000..0c6663692
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc1811/Ajc1811Tests.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Contributors
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andy Clement - initial API and implementation
+ *******************************************************************************/
+package org.aspectj.systemtest.ajc1811;
+
+import java.io.File;
+
+import org.aspectj.apache.bcel.Constants;
+import org.aspectj.apache.bcel.classfile.Attribute;
+import org.aspectj.apache.bcel.classfile.JavaClass;
+import org.aspectj.apache.bcel.classfile.Method;
+import org.aspectj.testing.XMLBasedAjcTestCase;
+import org.aspectj.weaver.ResolvedMember;
+import org.aspectj.weaver.ResolvedType;
+import org.aspectj.weaver.UnresolvedType;
+import org.aspectj.weaver.bcel.BcelWorld;
+
+import junit.framework.Test;
+
+/**
+ * @author Andy Clement
+ */
+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());
+// assertNotNull(returnType);
+//
+// // public Outer<String>.Inner m2() { ... }
+// }
+//
+// public void testMultiArgs_509235() {
+// runTest("multiargs");
+// }
+//
+// public void testMultiArgs_509235_2() {
+// runTest("multiargs - no ellipsis");
+// }
+
+ // ---
+
+ public static Test suite() {
+ return XMLBasedAjcTestCase.loadSuite(Ajc1811Tests.class);
+ }
+
+ @Override
+ protected File getSpecFile() {
+ return getClassResource("ajc1811.xml");
+ }
+
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc1811/AllTestsAspectJ1811.java b/tests/src/org/aspectj/systemtest/ajc1811/AllTestsAspectJ1811.java
new file mode 100644
index 000000000..b8aca6712
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc1811/AllTestsAspectJ1811.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Contributors
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andy Clement - initial API and implementation
+ *******************************************************************************/
+package org.aspectj.systemtest.ajc1811;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTestsAspectJ1811 {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("AspectJ 1.8.11 tests");
+ // $JUnit-BEGIN$
+ suite.addTest(Ajc1811Tests.suite());
+ // $JUnit-END$
+ return suite;
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc1811/ajc1811.xml b/tests/src/org/aspectj/systemtest/ajc1811/ajc1811.xml
new file mode 100644
index 000000000..f4e321e5c
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc1811/ajc1811.xml
@@ -0,0 +1,29 @@
+<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
+
+<suite>
+
+ <ajc-test dir="bugs1811/parameterizedWithInner" title="parameterized with inner">
+ <compile options="-1.8" files="Code.java"/>
+ </ajc-test>
+
+ <ajc-test dir="bugs1811/509235" title="multiargs">
+ <compile options="-1.8" files="Code.java"/>
+ <run class="Code">
+ <stdout>
+ <line text="username = fooname"/>
+ <line text="username = barname"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs1811/509235" title="multiargs - no ellipsis">
+ <compile options="-1.8" files="Code2.java"/>
+ <run class="Code2">
+ <stdout>
+ <line text="username = fooname"/>
+ <line text="username = barname"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+</suite>