aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/test/java/org/aspectj/systemtest/ajc196/SanityTestsJava14.java
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2020-04-20 16:24:02 -0700
committerAndy Clement <aclement@pivotal.io>2020-04-20 16:24:02 -0700
commit4471ba76ac755b504d99e514a1cf5a375e7d02d1 (patch)
tree5f8d4f4dfb79d72f6c344294a319b0b04b01e2ae /tests/src/test/java/org/aspectj/systemtest/ajc196/SanityTestsJava14.java
parent17026e35243f229c2e3c07c292f2caaac65503a4 (diff)
downloadaspectj-4471ba76ac755b504d99e514a1cf5a375e7d02d1.tar.gz
aspectj-4471ba76ac755b504d99e514a1cf5a375e7d02d1.zip
Include JDTCore for Java14
Diffstat (limited to 'tests/src/test/java/org/aspectj/systemtest/ajc196/SanityTestsJava14.java')
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc196/SanityTestsJava14.java89
1 files changed, 89 insertions, 0 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc196/SanityTestsJava14.java b/tests/src/test/java/org/aspectj/systemtest/ajc196/SanityTestsJava14.java
new file mode 100644
index 000000000..edf08298c
--- /dev/null
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc196/SanityTestsJava14.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2020 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.ajc196;
+
+import org.aspectj.testing.XMLBasedAjcTestCase;
+import org.aspectj.testing.XMLBasedAjcTestCaseForJava14OrLater;
+
+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 SanityTestsJava14 extends XMLBasedAjcTestCaseForJava14OrLater {
+
+ public static final int bytecode_version_for_JDK_level = 58;
+
+ // 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(SanityTestsJava14.class);
+ }
+
+ @Override
+ protected java.net.URL getSpecFile() {
+ return getClassResource("sanity-tests-14.xml");
+ }
+
+}