aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/test/java/org/aspectj/systemtest/ajc195
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2019-11-25 10:40:44 -0800
committerAndy Clement <aclement@pivotal.io>2019-11-25 10:40:44 -0800
commit2704db20ecca12d3bbe514a4f7b84d297937de86 (patch)
tree2938cb6c560d2ea220272af703452ccd096702ca /tests/src/test/java/org/aspectj/systemtest/ajc195
parent41c7347b064093b531b04004d42665582ba0fff0 (diff)
downloadaspectj-2704db20ecca12d3bbe514a4f7b84d297937de86.tar.gz
aspectj-2704db20ecca12d3bbe514a4f7b84d297937de86.zip
Java 13 support
Diffstat (limited to 'tests/src/test/java/org/aspectj/systemtest/ajc195')
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc195/AllTestsAspectJ195.java1
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc195/SanityTestsJava13.java89
2 files changed, 90 insertions, 0 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc195/AllTestsAspectJ195.java b/tests/src/test/java/org/aspectj/systemtest/ajc195/AllTestsAspectJ195.java
index a7eb6604e..8a714a606 100644
--- a/tests/src/test/java/org/aspectj/systemtest/ajc195/AllTestsAspectJ195.java
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc195/AllTestsAspectJ195.java
@@ -18,6 +18,7 @@ public class AllTestsAspectJ195 {
public static Test suite() {
TestSuite suite = new TestSuite("AspectJ 1.9.4 tests");
suite.addTest(Ajc195Tests.suite());
+ suite.addTest(SanityTestsJava13.suite());
return suite;
}
}
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc195/SanityTestsJava13.java b/tests/src/test/java/org/aspectj/systemtest/ajc195/SanityTestsJava13.java
new file mode 100644
index 000000000..89ac25e07
--- /dev/null
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc195/SanityTestsJava13.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2018 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
+ *******************************************************************************/
+package org.aspectj.systemtest.ajc195;
+
+import org.aspectj.testing.XMLBasedAjcTestCase;
+import org.aspectj.testing.XMLBasedAjcTestCaseForJava13OrLater;
+
+import junit.framework.Test;
+
+/*
+ * Some very trivial tests that help verify things are OK.
+ * These are a copy of the earlier Sanity Tests created for 1.6 but these supply the -10 option
+ * to check code generation and modification with that version specified.
+ *
+ * @author Andy Clement
+ */
+public class SanityTestsJava13 extends XMLBasedAjcTestCaseForJava13OrLater {
+
+ public static final int bytecode_version_for_JDK_level = 57;
+
+ // Incredibly trivial test programs that check the compiler works at all (these are easy-ish to debug)
+ public void testSimpleJava_A() {
+ runTest("simple - a");
+ }
+
+ public void testSimpleJava_B() {
+ runTest("simple - b");
+ }
+
+ public void testSimpleCode_C() {
+ runTest("simple - c");
+ }
+
+ public void testSimpleCode_D() {
+ runTest("simple - d");
+ }
+
+ public void testSimpleCode_E() {
+ runTest("simple - e");
+ }
+
+ public void testSimpleCode_F() {
+ runTest("simple - f");
+ }
+
+ public void testSimpleCode_G() {
+ runTest("simple - g");
+ }
+
+ public void testSimpleCode_H() {
+ runTest("simple - h", true);
+ }
+
+ public void testSimpleCode_I() {
+ runTest("simple - i");
+ }
+
+ public void testVersionCorrect1() throws ClassNotFoundException {
+ runTest("simple - j");
+ checkVersion("A", bytecode_version_for_JDK_level, 0);
+ }
+
+ public void testVersionCorrect2() throws ClassNotFoundException {
+ runTest("simple - k");
+ checkVersion("A", bytecode_version_for_JDK_level, 0);
+ }
+
+ public void testVersionCorrect4() throws ClassNotFoundException { // check it is 49.0 when -1.5 is specified
+ runTest("simple - m");
+ checkVersion("A", 49, 0);
+ }
+
+
+ // ///////////////////////////////////////
+ public static Test suite() {
+ return XMLBasedAjcTestCase.loadSuite(SanityTestsJava13.class);
+ }
+
+ @Override
+ protected java.net.URL getSpecFile() {
+ return getClassResource("sanity-tests-13.xml");
+ }
+
+}