summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2016-06-17 10:40:29 -0700
committerAndy Clement <aclement@pivotal.io>2016-06-17 10:40:29 -0700
commit34f33f6948799dd57aeef1d8422f796fbd6d416d (patch)
tree805c1d6cd7bd2c6868e519f6c34a8f3fcb7f634c /tests
parentf8b86ff2c03a77e47e87573b59bc43c57cfdee38 (diff)
downloadaspectj-34f33f6948799dd57aeef1d8422f796fbd6d416d.tar.gz
aspectj-34f33f6948799dd57aeef1d8422f796fbd6d416d.zip
Upgrading to latest 1.9 compiler
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs1810/493554/example/aspect/FooAspect$ajcMightHaveAspect.classbin0 -> 434 bytes
-rw-r--r--tests/bugs1810/493554/example/aspect/FooAspect.classbin0 -> 4177 bytes
-rw-r--r--tests/bugs1810/493554/example/dep/Dep.classbin0 -> 2375 bytes
-rw-r--r--tests/bugs1810/493554/example/kusedep/Cmd.classbin0 -> 663 bytes
-rw-r--r--tests/bugs1810/generics/Code.java9
-rw-r--r--tests/bugs190/modules/aspect1/Azpect1.java5
-rwxr-xr-xtests/bugs190/modules/cpl.sh4
-rw-r--r--tests/bugs190/modules/module1/Code.java6
-rw-r--r--tests/bugs190/modules/module1/a/b/c/Code.classbin0 -> 425 bytes
-rw-r--r--tests/bugs190/modules/module1/module-info.classbin0 -> 124 bytes
-rw-r--r--tests/bugs190/modules/module1/module-info.java2
-rw-r--r--tests/bugs190/modules/module1/module-one.jarbin0 -> 1315 bytes
-rw-r--r--tests/bugs190/modules/play/m11
-rw-r--r--tests/bugs190/modules/play/src/a/module-info.java2
-rw-r--r--tests/bugs190/modules/play/src/b/module-info.java2
-rw-r--r--tests/src/org/aspectj/systemtest/AllTests19.java28
-rw-r--r--tests/src/org/aspectj/systemtest/ajc190/Ajc190Tests.java40
-rw-r--r--tests/src/org/aspectj/systemtest/ajc190/AllTestsAspectJ190.java27
-rw-r--r--tests/src/org/aspectj/systemtest/ajc190/ajc190.xml10
-rw-r--r--tests/testsrc/org/aspectj/tests/TestsModuleTests.java5
20 files changed, 150 insertions, 1 deletions
diff --git a/tests/bugs1810/493554/example/aspect/FooAspect$ajcMightHaveAspect.class b/tests/bugs1810/493554/example/aspect/FooAspect$ajcMightHaveAspect.class
new file mode 100644
index 000000000..8f9346bef
--- /dev/null
+++ b/tests/bugs1810/493554/example/aspect/FooAspect$ajcMightHaveAspect.class
Binary files differ
diff --git a/tests/bugs1810/493554/example/aspect/FooAspect.class b/tests/bugs1810/493554/example/aspect/FooAspect.class
new file mode 100644
index 000000000..6c5f481fd
--- /dev/null
+++ b/tests/bugs1810/493554/example/aspect/FooAspect.class
Binary files differ
diff --git a/tests/bugs1810/493554/example/dep/Dep.class b/tests/bugs1810/493554/example/dep/Dep.class
new file mode 100644
index 000000000..cda4a43e0
--- /dev/null
+++ b/tests/bugs1810/493554/example/dep/Dep.class
Binary files differ
diff --git a/tests/bugs1810/493554/example/kusedep/Cmd.class b/tests/bugs1810/493554/example/kusedep/Cmd.class
new file mode 100644
index 000000000..536d1120c
--- /dev/null
+++ b/tests/bugs1810/493554/example/kusedep/Cmd.class
Binary files differ
diff --git a/tests/bugs1810/generics/Code.java b/tests/bugs1810/generics/Code.java
new file mode 100644
index 000000000..cc3672268
--- /dev/null
+++ b/tests/bugs1810/generics/Code.java
@@ -0,0 +1,9 @@
+class AbstractSuperClass<A,B> {}
+interface InterfaceOne {}
+interface InterfaceTwo<A> {}
+class ID {}
+abstract class AbstractTestClass<T> extends AbstractSuperClass<T,ID> implements InterfaceOne, InterfaceTwo<T> {
+}
+class TestType {}
+class ConcreteClass extends AbstractTestClass<TestType> {
+}
diff --git a/tests/bugs190/modules/aspect1/Azpect1.java b/tests/bugs190/modules/aspect1/Azpect1.java
new file mode 100644
index 000000000..6106916af
--- /dev/null
+++ b/tests/bugs190/modules/aspect1/Azpect1.java
@@ -0,0 +1,5 @@
+public aspect Azpect1 {
+ before(): execution(* main(..)) {
+ System.out.println("Azpect1.before running");
+ }
+}
diff --git a/tests/bugs190/modules/cpl.sh b/tests/bugs190/modules/cpl.sh
new file mode 100755
index 000000000..ca5f7b057
--- /dev/null
+++ b/tests/bugs190/modules/cpl.sh
@@ -0,0 +1,4 @@
+cd module1
+javac module-info.java Code.java -d .
+jar -cvMf module-one.jar *
+cd ..
diff --git a/tests/bugs190/modules/module1/Code.java b/tests/bugs190/modules/module1/Code.java
new file mode 100644
index 000000000..5cc9632d1
--- /dev/null
+++ b/tests/bugs190/modules/module1/Code.java
@@ -0,0 +1,6 @@
+package a.b.c;
+public class Code {
+ public static void main(String []argv) {
+ System.out.println("Code.main running");
+ }
+}
diff --git a/tests/bugs190/modules/module1/a/b/c/Code.class b/tests/bugs190/modules/module1/a/b/c/Code.class
new file mode 100644
index 000000000..5d5e514b8
--- /dev/null
+++ b/tests/bugs190/modules/module1/a/b/c/Code.class
Binary files differ
diff --git a/tests/bugs190/modules/module1/module-info.class b/tests/bugs190/modules/module1/module-info.class
new file mode 100644
index 000000000..0088bd13a
--- /dev/null
+++ b/tests/bugs190/modules/module1/module-info.class
Binary files differ
diff --git a/tests/bugs190/modules/module1/module-info.java b/tests/bugs190/modules/module1/module-info.java
new file mode 100644
index 000000000..7edf5da1f
--- /dev/null
+++ b/tests/bugs190/modules/module1/module-info.java
@@ -0,0 +1,2 @@
+module one {
+}
diff --git a/tests/bugs190/modules/module1/module-one.jar b/tests/bugs190/modules/module1/module-one.jar
new file mode 100644
index 000000000..907678e9c
--- /dev/null
+++ b/tests/bugs190/modules/module1/module-one.jar
Binary files differ
diff --git a/tests/bugs190/modules/play/m b/tests/bugs190/modules/play/m
new file mode 100644
index 000000000..54520da0a
--- /dev/null
+++ b/tests/bugs190/modules/play/m
@@ -0,0 +1,11 @@
+module M.N {
+ requires A.B;
+ requires public C.D;
+
+ exports P.Q;
+ exports R.S to T1.U1, T2.U2;
+
+ uses V.W;
+ provides X.Y with Z1.Z2;
+ provides X.Y with Z3.Z4;
+}
diff --git a/tests/bugs190/modules/play/src/a/module-info.java b/tests/bugs190/modules/play/src/a/module-info.java
new file mode 100644
index 000000000..5de28f635
--- /dev/null
+++ b/tests/bugs190/modules/play/src/a/module-info.java
@@ -0,0 +1,2 @@
+module a {
+}
diff --git a/tests/bugs190/modules/play/src/b/module-info.java b/tests/bugs190/modules/play/src/b/module-info.java
new file mode 100644
index 000000000..d7a65f08e
--- /dev/null
+++ b/tests/bugs190/modules/play/src/b/module-info.java
@@ -0,0 +1,2 @@
+module b {
+}
diff --git a/tests/src/org/aspectj/systemtest/AllTests19.java b/tests/src/org/aspectj/systemtest/AllTests19.java
new file mode 100644
index 000000000..4835a6154
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/AllTests19.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2013, 2014 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;
+
+import org.aspectj.systemtest.ajc190.AllTestsAspectJ190;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTests19 {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("AspectJ System Test Suite - 1.9");
+ // $JUnit-BEGIN$
+ suite.addTest(AllTestsAspectJ190.suite());
+ suite.addTest(AllTests18.suite());
+ // $JUnit-END$
+ return suite;
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc190/Ajc190Tests.java b/tests/src/org/aspectj/systemtest/ajc190/Ajc190Tests.java
new file mode 100644
index 000000000..26fc7c78d
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc190/Ajc190Tests.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * 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.ajc190;
+
+import java.io.File;
+
+import org.aspectj.testing.XMLBasedAjcTestCase;
+
+import junit.framework.Test;
+
+/**
+ * @author Andy Clement
+ */
+public class Ajc190Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+
+ // Weave a module with code that isn't in a module
+ public void testWeaveModule() throws Exception {
+ runTest("weave module");
+ }
+
+ // ---
+
+ public static Test suite() {
+ return XMLBasedAjcTestCase.loadSuite(Ajc190Tests.class);
+ }
+
+ @Override
+ protected File getSpecFile() {
+ return getClassResource("ajc190.xml");
+ }
+
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc190/AllTestsAspectJ190.java b/tests/src/org/aspectj/systemtest/ajc190/AllTestsAspectJ190.java
new file mode 100644
index 000000000..36b767f1c
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc190/AllTestsAspectJ190.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2014 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.ajc190;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.aspectj.systemtest.apt.AptTests;
+
+public class AllTestsAspectJ190 {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("AspectJ 1.8.5 tests");
+ // $JUnit-BEGIN$
+ suite.addTest(Ajc190Tests.suite());
+ suite.addTest(AptTests.suite());
+ // $JUnit-END$
+ return suite;
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc190/ajc190.xml b/tests/src/org/aspectj/systemtest/ajc190/ajc190.xml
new file mode 100644
index 000000000..bbe04073d
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc190/ajc190.xml
@@ -0,0 +1,10 @@
+<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
+
+<suite>
+
+ <ajc-test dir="bugs190/modules" title="weave module">
+ <compile files="aspect1/Azpect1.java" inpath="module1/module-one.jar" outjar="runner.jar" options="-1.8"/>
+ <java classpath="runner.jar" class="a.b.c.Code"/>
+ </ajc-test>
+
+</suite>
diff --git a/tests/testsrc/org/aspectj/tests/TestsModuleTests.java b/tests/testsrc/org/aspectj/tests/TestsModuleTests.java
index 35d88df72..672a95299 100644
--- a/tests/testsrc/org/aspectj/tests/TestsModuleTests.java
+++ b/tests/testsrc/org/aspectj/tests/TestsModuleTests.java
@@ -20,6 +20,7 @@ import org.aspectj.systemtest.AllTests;
import org.aspectj.systemtest.AllTests14;
import org.aspectj.systemtest.AllTests17;
import org.aspectj.systemtest.AllTests18;
+import org.aspectj.systemtest.AllTests19;
import org.aspectj.util.LangUtil;
public class TestsModuleTests extends TestCase {
@@ -28,7 +29,9 @@ public class TestsModuleTests extends TestCase {
String name = TestsModuleTests.class.getName();
TestSuite suite = new TestSuite(name);
// compiler tests, wrapped for JUnit
- if (LangUtil.is18VMOrGreater()) {
+ if (LangUtil.is19VMOrGreater()) {
+ suite.addTest(AllTests19.suite());
+ } else if (LangUtil.is18VMOrGreater()) {
suite.addTest(AllTests18.suite());
} else if (LangUtil.is15VMOrGreater()) {
// suite.addTest(AllTests15.suite());