aboutsummaryrefslogtreecommitdiffstats
path: root/tests
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
parent17026e35243f229c2e3c07c292f2caaac65503a4 (diff)
downloadaspectj-4471ba76ac755b504d99e514a1cf5a375e7d02d1.tar.gz
aspectj-4471ba76ac755b504d99e514a1cf5a375e7d02d1.zip
Include JDTCore for Java14
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs196/java14/Jep305.java22
-rw-r--r--tests/bugs196/java14/Person.java2
-rw-r--r--tests/bugs196/java14/TraceRecordComponents.aj5
-rw-r--r--tests/bugs196/java14/UsingPersonRecord.java7
-rw-r--r--tests/bugs196/java14/p.java2
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/AllTests19.java2
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc193/AllTestsAspectJ193.java2
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc193/Java13Tests.java15
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc195/Ajc195Tests.java7
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc195/AllTestsAspectJ195.java2
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc196/Ajc196Tests.java71
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc196/AllTestsAspectJ196.java24
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc196/SanityTestsJava14.java89
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/java14/Java14Tests.java211
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/pre10x/AjcPre10xTests.java554
-rw-r--r--tests/src/test/java/org/aspectj/tests/TestsModuleTests.java24
-rw-r--r--tests/src/test/resources/org/aspectj/systemtest/ajc150/ajc150.xml54
-rw-r--r--tests/src/test/resources/org/aspectj/systemtest/ajc151/ajc151.xml12
-rw-r--r--tests/src/test/resources/org/aspectj/systemtest/ajc169/intertype.xml21
-rw-r--r--tests/src/test/resources/org/aspectj/systemtest/ajc170/ajc170.xml6
-rw-r--r--tests/src/test/resources/org/aspectj/systemtest/ajc174/ajc174.xml3
-rw-r--r--tests/src/test/resources/org/aspectj/systemtest/ajc193/ajc193.xml40
-rw-r--r--tests/src/test/resources/org/aspectj/systemtest/ajc195/ajc195.xml27
-rw-r--r--tests/src/test/resources/org/aspectj/systemtest/ajc196/ajc196.xml118
-rw-r--r--tests/src/test/resources/org/aspectj/systemtest/ajc196/sanity-tests-14.xml69
25 files changed, 874 insertions, 515 deletions
diff --git a/tests/bugs196/java14/Jep305.java b/tests/bugs196/java14/Jep305.java
new file mode 100644
index 000000000..3c526aef3
--- /dev/null
+++ b/tests/bugs196/java14/Jep305.java
@@ -0,0 +1,22 @@
+class Orange {
+ public String name1 = "orange";
+}
+
+class Apple {
+ public String name2 = "apple";
+}
+
+public class Jep305 {
+ public static void main(String []argv) {
+ print(new Orange());
+ print(new Apple());
+ }
+
+ public static void print(Object obj) {
+ if (obj instanceof Orange o) {
+ System.out.println(o.name1);
+ } else if (obj instanceof Apple a) {
+ System.out.println(a.name2);
+ }
+ }
+}
diff --git a/tests/bugs196/java14/Person.java b/tests/bugs196/java14/Person.java
new file mode 100644
index 000000000..a74932c83
--- /dev/null
+++ b/tests/bugs196/java14/Person.java
@@ -0,0 +1,2 @@
+public record Person(String firstName, String lastName, int age) {}
+
diff --git a/tests/bugs196/java14/TraceRecordComponents.aj b/tests/bugs196/java14/TraceRecordComponents.aj
new file mode 100644
index 000000000..80cc2444e
--- /dev/null
+++ b/tests/bugs196/java14/TraceRecordComponents.aj
@@ -0,0 +1,5 @@
+public aspect TraceRecordComponents {
+ before(): execution(public * *()) {
+ System.out.println(thisJoinPointStaticPart);
+ }
+}
diff --git a/tests/bugs196/java14/UsingPersonRecord.java b/tests/bugs196/java14/UsingPersonRecord.java
new file mode 100644
index 000000000..a974e9913
--- /dev/null
+++ b/tests/bugs196/java14/UsingPersonRecord.java
@@ -0,0 +1,7 @@
+public class UsingPersonRecord {
+ public static void main(String[] argv) {
+ Person p = new Person("A","B",99);
+ System.out.println(p);
+ System.out.println(p.firstName());
+ }
+}
diff --git a/tests/bugs196/java14/p.java b/tests/bugs196/java14/p.java
new file mode 100644
index 000000000..a74932c83
--- /dev/null
+++ b/tests/bugs196/java14/p.java
@@ -0,0 +1,2 @@
+public record Person(String firstName, String lastName, int age) {}
+
diff --git a/tests/src/test/java/org/aspectj/systemtest/AllTests19.java b/tests/src/test/java/org/aspectj/systemtest/AllTests19.java
index eeff00b31..20ecc3894 100644
--- a/tests/src/test/java/org/aspectj/systemtest/AllTests19.java
+++ b/tests/src/test/java/org/aspectj/systemtest/AllTests19.java
@@ -12,6 +12,7 @@ import org.aspectj.systemtest.ajc191.AllTestsAspectJ191;
import org.aspectj.systemtest.ajc192.AllTestsAspectJ192;
import org.aspectj.systemtest.ajc193.AllTestsAspectJ193;
import org.aspectj.systemtest.ajc195.AllTestsAspectJ195;
+import org.aspectj.systemtest.ajc196.AllTestsAspectJ196;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -30,6 +31,7 @@ public class AllTests19 {
suite.addTest(AllTestsAspectJ193.suite());
// there were no new tests for 1.9.4
suite.addTest(AllTestsAspectJ195.suite());
+ suite.addTest(AllTestsAspectJ196.suite());
suite.addTest(AllTests18.suite());
// $JUnit-END$
return suite;
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc193/AllTestsAspectJ193.java b/tests/src/test/java/org/aspectj/systemtest/ajc193/AllTestsAspectJ193.java
index f40e44805..7f941a3d3 100644
--- a/tests/src/test/java/org/aspectj/systemtest/ajc193/AllTestsAspectJ193.java
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc193/AllTestsAspectJ193.java
@@ -18,7 +18,7 @@ public class AllTestsAspectJ193 {
public static Test suite() {
TestSuite suite = new TestSuite("AspectJ 1.9.3 tests");
suite.addTest(Ajc193Tests.suite());
- suite.addTest(Java13Tests.suite());
+ // suite.addTest(Java13Tests.suite());
return suite;
}
}
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc193/Java13Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc193/Java13Tests.java
index 3b007963f..c6a32bcc8 100644
--- a/tests/src/test/java/org/aspectj/systemtest/ajc193/Java13Tests.java
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc193/Java13Tests.java
@@ -7,7 +7,6 @@
*******************************************************************************/
package org.aspectj.systemtest.ajc193;
-import org.aspectj.apache.bcel.Constants;
import org.aspectj.testing.XMLBasedAjcTestCase;
import org.aspectj.testing.XMLBasedAjcTestCaseForJava13OrLater;
@@ -18,20 +17,6 @@ import junit.framework.Test;
*/
public class Java13Tests extends XMLBasedAjcTestCaseForJava13OrLater {
- public void testSwitch1() {
- runTest("switch 1");
- checkVersion("Switch1", Constants.MAJOR_13, Constants.PREVIEW_MINOR_VERSION);
- }
-
- public void testSwitch2() {
- runTest("switch 2");
- checkVersion("Switch2", Constants.MAJOR_13, Constants.PREVIEW_MINOR_VERSION);
- }
-
- public void testSwitch3() {
- runTest("switch 3");
- checkVersion("Switch3", Constants.MAJOR_13, Constants.PREVIEW_MINOR_VERSION);
- }
// ---
public static Test suite() {
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc195/Ajc195Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc195/Ajc195Tests.java
index 338ca47e9..e629d504b 100644
--- a/tests/src/test/java/org/aspectj/systemtest/ajc195/Ajc195Tests.java
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc195/Ajc195Tests.java
@@ -32,13 +32,6 @@ public class Ajc195Tests extends XMLBasedAjcTestCase {
runTest("around finally blocks and unlinking");
}
- public void testTextBlock1() {
- runTest("textblock 1");
- }
-
- public void testTextBlock2() {
- runTest("textblock 2");
- }
// ---
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 8a714a606..f8a95a28a 100644
--- a/tests/src/test/java/org/aspectj/systemtest/ajc195/AllTestsAspectJ195.java
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc195/AllTestsAspectJ195.java
@@ -16,7 +16,7 @@ import junit.framework.TestSuite;
public class AllTestsAspectJ195 {
public static Test suite() {
- TestSuite suite = new TestSuite("AspectJ 1.9.4 tests");
+ TestSuite suite = new TestSuite("AspectJ 1.9.5 tests");
suite.addTest(Ajc195Tests.suite());
suite.addTest(SanityTestsJava13.suite());
return suite;
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc196/Ajc196Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc196/Ajc196Tests.java
new file mode 100644
index 000000000..d1c7c2ced
--- /dev/null
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc196/Ajc196Tests.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * 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.apache.bcel.Constants;
+import org.aspectj.testing.XMLBasedAjcTestCase;
+import org.aspectj.testing.XMLBasedAjcTestCaseForJava14OrLater;
+
+import junit.framework.Test;
+
+/**
+ * @author Andy Clement
+ */
+public class Ajc196Tests extends XMLBasedAjcTestCaseForJava14OrLater {
+
+ public void testRecords() {
+ runTest("simple record");
+ checkVersion("Person", Constants.MAJOR_14, Constants.PREVIEW_MINOR_VERSION);
+ }
+
+ public void testRecords2() {
+ runTest("using a record");
+ }
+
+ public void testInstanceofPatterns() {
+ runTest("instanceof patterns");
+ }
+
+ public void testAdvisingRecords() {
+ runTest("advising records");
+ }
+
+ public void testSwitch1() {
+ runTest("switch 1");
+ checkVersion("Switch1", Constants.MAJOR_14, 0);
+ }
+
+ public void testSwitch2() {
+ runTest("switch 2");
+ checkVersion("Switch2", Constants.MAJOR_14, 0);
+ }
+
+ public void testSwitch3() {
+ runTest("switch 3");
+ checkVersion("Switch3", Constants.MAJOR_14, 0);
+ }
+
+ public void testTextBlock1() {
+ runTest("textblock 1");
+ }
+
+ public void testTextBlock2() {
+ runTest("textblock 2");
+ }
+ // ---
+
+ public static Test suite() {
+ return XMLBasedAjcTestCase.loadSuite(Ajc196Tests.class);
+ }
+
+ @Override
+ protected java.net.URL getSpecFile() {
+ return getClassResource("ajc196.xml");
+ }
+
+}
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc196/AllTestsAspectJ196.java b/tests/src/test/java/org/aspectj/systemtest/ajc196/AllTestsAspectJ196.java
new file mode 100644
index 000000000..1c8e725f0
--- /dev/null
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc196/AllTestsAspectJ196.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * 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 junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Andy Clement
+ */
+public class AllTestsAspectJ196 {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("AspectJ 1.9.6 tests");
+ suite.addTest(Ajc196Tests.suite());
+ suite.addTest(SanityTestsJava14.suite());
+ return suite;
+ }
+}
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");
+ }
+
+}
diff --git a/tests/src/test/java/org/aspectj/systemtest/java14/Java14Tests.java b/tests/src/test/java/org/aspectj/systemtest/java14/Java14Tests.java
index edfd9ad71..c46708feb 100644
--- a/tests/src/test/java/org/aspectj/systemtest/java14/Java14Tests.java
+++ b/tests/src/test/java/org/aspectj/systemtest/java14/Java14Tests.java
@@ -4,8 +4,8 @@
* 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
- *
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* ******************************************************************/
package org.aspectj.systemtest.java14;
@@ -16,109 +16,110 @@ import junit.framework.Test;
public class Java14Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
- public static Test suite() {
- return XMLBasedAjcTestCase.loadSuite(Java14Tests.class);
- }
-
- protected java.net.URL getSpecFile() {
- return getClassResource("java14.xml");
- }
-
-
- public void test001(){
- runTest("assert flow");
- }
-
- public void test002(){
- runTest("assert flow - 2");
- }
-
- public void test003(){
- runTest("assert typing");
- }
-
-// bug in eclipse compiler, moved to ajcTestsFailing.xml
-// public void test004(){
-// runTest("assert coverage tests [requires 1.4]");
-// }
-
-// bug in eclipse compiler, moved to ajcTestsFailing.xml
-// public void test005(){
-// runTest("assert coverage tests in one package [requires 1.4]");
-// }
-
- public void test006(){
- if (!LangUtil.is14VMOrGreater()) { System.err.println("Skipping test 006 not >=1.4");return;}
- runTest("compiling asserts in methods");
- }
-
- public void test007(){
- if (!LangUtil.is14VMOrGreater()) { System.err.println("Skipping test 007 not >=1.4");return;}
- runTest("asserts");
- }
-
- public void test008(){
- if (!LangUtil.is14VMOrGreater()) { System.err.println("Skipping test 008 not >=1.4");return;}
- runTest("asserts in aspect and declared methods [requires 1.4]");
- }
-
- public void test009(){
- runTest("Does the matrix coverage thing for the new method signatures");
- }
-
- public void test010(){
- runTest("correct types of parameters at call-sites");
- }
-
- public void test011(){
- runTest("target type matching with messy interface hierarchies");
- }
-
- public void test012(){
- if (!LangUtil.is14VMOrGreater()) { System.err.println("Skipping test 012 not >=1.4");return;}
- runTest("assert tests in introduction [requires 1.4]");
- }
-
- public void test013(){
- runTest("various forms of package name pattern matching work");
- }
-
- public void test014(){
- if (!LangUtil.is14VMOrGreater()) { System.err.println("Skipping test 014 not >=1.4");return;}
- runTest("assert statement in advice coverage [requires 1.4]");
- }
-
- public void test015(){
- if (!LangUtil.is14VMOrGreater()) { System.err.println("Skipping test 015 not >=1.4");return;}
- runTest("assert statement in advice [requires 1.4]");
- }
-
- public void test016(){
- if (!LangUtil.is14VMOrGreater()) { System.err.println("Skipping test 016 not >=1.4");return;}
- runTest("assert and pertarget crashes compiler");
- }
-
- public void test017(){
- if (!LangUtil.is14VMOrGreater()) { System.err.println("Skipping test 017 not >=1.4");return;}
- runTest("testing that assert works like .class");
- }
-
- public void test018(){
- runTest("JoinPoint Optimization when targetting 1.4");
- }
-
- public void test019(){
- runTest("XLint warning for call PCD's using subtype of defining type (-1.4 -Xlint:ignore)");
- }
-
- // public void test020(){
- // runTest("XLint warning for call PCD's using subtype of defining type (-1.4)");
- // }
-
- public void test021(){
- if (!LangUtil.is14VMOrGreater()) { System.err.println("Skipping test 021 not >=1.4");return;}
- runTest("Class Literals as non final fields (also assert, and this$0)");
- }
+ public static Test suite() {
+ return XMLBasedAjcTestCase.loadSuite(Java14Tests.class);
+ }
+
+ @Override
+ protected java.net.URL getSpecFile() {
+ return getClassResource("java14.xml");
+ }
+
+
+ public void test001(){
+ runTest("assert flow");
+ }
+
+ public void test002(){
+ runTest("assert flow - 2");
+ }
+
+ public void test003(){
+ runTest("assert typing");
+ }
+
+ // bug in eclipse compiler, moved to ajcTestsFailing.xml
+ // public void test004(){
+ // runTest("assert coverage tests [requires 1.4]");
+ // }
+
+ // bug in eclipse compiler, moved to ajcTestsFailing.xml
+ // public void test005(){
+ // runTest("assert coverage tests in one package [requires 1.4]");
+ // }
+
+ public void test006(){
+ if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 006 not >=1.4");return;}
+ runTest("compiling asserts in methods");
+ }
+
+ public void test007(){
+ if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 007 not >=1.4");return;}
+ runTest("asserts");
+ }
+
+ public void test008(){
+ if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 008 not >=1.4");return;}
+ runTest("asserts in aspect and declared methods [requires 1.4]");
+ }
+
+ public void test009(){
+ runTest("Does the matrix coverage thing for the new method signatures");
+ }
+
+ public void test010(){
+ runTest("correct types of parameters at call-sites");
+ }
+
+ public void test011(){
+ runTest("target type matching with messy interface hierarchies");
+ }
+
+ public void test012(){
+ if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 012 not >=1.4");return;}
+ runTest("assert tests in introduction [requires 1.4]");
+ }
+
+ public void test013(){
+ runTest("various forms of package name pattern matching work");
+ }
+
+ public void test014(){
+ if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 014 not >=1.4");return;}
+ runTest("assert statement in advice coverage [requires 1.4]");
+ }
+
+ public void test015(){
+ if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 015 not >=1.4");return;}
+ runTest("assert statement in advice [requires 1.4]");
+ }
+
+ public void test016(){
+ if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 016 not >=1.4");return;}
+ runTest("assert and pertarget crashes compiler");
+ }
+
+ public void test017(){
+ if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 017 not >=1.4");return;}
+ runTest("testing that assert works like .class");
+ }
+
+ public void test018(){
+ runTest("JoinPoint Optimization when targetting 1.4");
+ }
+
+ public void test019(){
+ runTest("XLint warning for call PCD's using subtype of defining type (-1.4 -Xlint:ignore)");
+ }
+
+ // public void test020(){
+ // runTest("XLint warning for call PCD's using subtype of defining type (-1.4)");
+ // }
+
+ public void test021(){
+ if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 021 not >=1.4");return;}
+ runTest("Class Literals as non final fields (also assert, and this$0)");
+ }
}
diff --git a/tests/src/test/java/org/aspectj/systemtest/pre10x/AjcPre10xTests.java b/tests/src/test/java/org/aspectj/systemtest/pre10x/AjcPre10xTests.java
index e82c91349..38f9ae97b 100644
--- a/tests/src/test/java/org/aspectj/systemtest/pre10x/AjcPre10xTests.java
+++ b/tests/src/test/java/org/aspectj/systemtest/pre10x/AjcPre10xTests.java
@@ -4,8 +4,8 @@
* 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
- *
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* ******************************************************************/
package org.aspectj.systemtest.pre10x;
@@ -15,302 +15,304 @@ import junit.framework.Test;
public class AjcPre10xTests extends org.aspectj.testing.XMLBasedAjcTestCase {
- public static Test suite() {
- return XMLBasedAjcTestCase.loadSuite(AjcPre10xTests.class);
- }
+ public static Test suite() {
+ return XMLBasedAjcTestCase.loadSuite(AjcPre10xTests.class);
+ }
- protected java.net.URL getSpecFile() {
- return getClassResource("pre10x.xml");
- }
+ @Override
+ protected java.net.URL getSpecFile() {
+ return getClassResource("pre10x.xml");
+ }
- public void test001(){
- runTest("Using 'aspect' as identifier is legal TODO");
- }
+ public void test001(){
+ runTest("Using 'aspect' as identifier is legal TODO");
+ }
- public void test002(){
- runTest("Using 'pointcut' as identifier is legal TODO");
- }
+ public void test002(){
+ runTest("Using 'pointcut' as identifier is legal TODO");
+ }
- public void test003(){
- runTest("CF expected when enclosing class superclass used as this qualifier in inner class");
- }
+ public void test003(){
+ runTest("CF expected when enclosing class superclass used as this qualifier in inner class");
+ }
- public void test004(){
- runTest("enclosing class may be used as this qualifier in inner class");
- }
+ public void test004(){
+ runTest("enclosing class may be used as this qualifier in inner class");
+ }
- public void test005(){
- runTest("reasonable error for crosscut reference with no formals specified");
- }
+ public void test005(){
+ runTest("reasonable error for crosscut reference with no formals specified");
+ }
- public void test006(){
- runTest("reasonable error for introduction on type whose source isn't found");
- }
+ public void test006(){
+ runTest("reasonable error for introduction on type whose source isn't found");
+ }
- public void test007(){
- runTest("handle errors in crosscut designators, insist that they end with a semicolon");
- }
+ public void test007(){
+ runTest("handle errors in crosscut designators, insist that they end with a semicolon");
+ }
- public void test008(){
- runTest("try to return from a before, after, after throwing and after returning");
- }
+ public void test008(){
+ runTest("try to return from a before, after, after throwing and after returning");
+ }
- public void test009(){
- runTest("the designator has a wildcard for method name but no return type specified");
- }
+ public void test009(){
+ runTest("the designator has a wildcard for method name but no return type specified");
+ }
- public void test010(){
- runTest("the designator for the introduction has no type after the | charcter");
- }
+ public void test010(){
+ runTest("the designator for the introduction has no type after the | charcter");
+ }
- public void test011(){
- runTest("crosscut signature does not match");
- }
+ public void test011(){
+ runTest("crosscut signature does not match");
+ }
- public void test012(){
- runTest("proper exit conditions when errors fall through to javac");
- }
+ public void test012(){
+ runTest("proper exit conditions when errors fall through to javac");
+ }
- public void test013(){
- runTest("mismatched parens on advice (wasn't binding Tester)");
- }
+ public void test013(){
+ runTest("mismatched parens on advice (wasn't binding Tester)");
+ }
+
+ public void test014(){
+ runTest("Non-static advice silently ignored");
+ }
+
+ public void test015(){
+ runTest("extra closing brace");
+ }
+
+ public void test016(){
+ runTest("decent errors for around return type not matching target point");
+ }
+
+ public void test017(){
+ runTest("eachobject: can't call new on an aspect of");
+ }
+
+ public void test018(){
+ runTest("eachobject: only zero-argument constructors allowed in an aspect");
+ }
+
+ public void test019(){
+ runTest("eachobject: can't extend a concrete aspect");
+ }
+
+ public void test020(){
+ runTest("instanceof used without a class");
+ }
+
+ public void test021(){
+ runTest("wildcard used for returns clause");
+ }
+
+ public void test022(){
+ runTest("no return statement in around advice");
+ }
+
+ public void test023(){
+ runTest("inner aspects must be static (no longer matches PR#286)");
+ }
+
+ public void test024(){
+ runTest("Casting class declarations as interfaces");
+ }
+
+ public void test025(){
+ runTest("omits a variable name and crashes with a null pointer");
+ }
+
+ public void test026(){
+ runTest("Not generating an error for using new as a method name");
+ }
+
+ public void test027(){
+ runTest("ClassCastException on the int literal");
+ }
+
+ public void test028(){
+ runTest("Wrong strictfp keyword usage in interface function prototype [TODO: move to errors]");
+ }
+
+ public void test029(){
+ runTest("Wrong strictfp keyword usage in field declaration [TODO: move to errors]");
+ }
+
+ public void test030(){
+ runTest("Wrong strictfp keyword usage in constructor declaration [TODO: move to errors]");
+ }
+
+ public void test031(){
+ runTest("Incorrect static casts to primitively foldable arguments should not crash the compiler.");
+ }
+
+ public void test032(){
+ runTest("Dominates with commas should signal an error.");
+ }
+
+ public void test033(){
+ runTest("stack overflow with recursive crosscut specifier");
+ }
+
+ public void test034(){
+ runTest("Throwing a NullPointerException when formals can't be bound in named pointcut");
+ }
+
+ public void test035(){
+ runTest("disallow defining more than one pointcut with the same name");
+ }
+
+ // With intro of record in Java14 the error messages here change
+ // public void test036(){
+ // runTest("pre 0.7 introduction form outside aspect body causes an EmptyStackException");
+ // }
+ //
+ // public void test037(){
+ // runTest("a class can't extend an aspect");
+ // }
+ //
+ // public void test038(){
+ // runTest("a before() clause at the class-level causes an EmptyStackException");
+ // }
+ //
+ // public void test039(){
+ // runTest("an after() clause at the class-level causes an EmptyStackException");
+ // }
+ //
+ // public void test040(){
+ // runTest("an around() clause at the class-level causes an EmptyStackException");
+ // }
+
+ public void test041(){
+ runTest("Doesn't detect cyclic inheritance of aspects.");
+ }
+
+ public void test042(){
+ runTest("Binds the pointcut formals to member variables instead of pointcut formals.");
+ }
+
+ public void test043(){
+ runTest("ambiguous formal in formals pattern");
+ }
+
+ public void test044(){
+ runTest("good error for field name instead of type name");
+ }
+
+ public void test045(){
+ runTest("errors in aspect inheritance - 1");
+ }
+
+ public void test046(){
+ runTest("errors in aspect inheritance - 2");
+ }
+
+ public void test047(){
+ runTest("errors in aspect inheritance - 3");
+ }
+
+ public void test048(){
+ runTest("errors in aspect inheritance - 4");
+ }
+
+ public void test049(){
+ runTest("circular dominates leading to irresolvable advice precedence");
+ }
+
+ public void test050(){
+ runTest("Should issue an error for using 'class' instead of 'aspect'");
+ }
+
+ public void test051(){
+ runTest("Should signal an error when we need an exposed value but don't provide it");
+ }
+
+ public void test052(){
+ runTest("StackOverFlowException with circular +implements's.");
+ }
+
+ public void test053(){
+ runTest("Introducing protected methods is causing a crash");
+ }
+
+ public void test054(){
+ runTest("Introducing protected fields is causing a crash");
+ }
+
+ public void test055(){
+ runTest("two classes with the same fully-qualified names [eachjvm]");
+ }
+
+ public void test056(){
+ runTest("Undefined pointcuts were throwing exceptions in 07b11 [callsto]");
+ }
+
+ public void test057(){
+ runTest("advice on abstract pointcuts");
+ }
+
+ public void test058(){
+ runTest("Whoops, I forgot to put a class in the field access PCD.");
+ }
+
+ public void test059(){
+ runTest("the arounds return something but there is no returns statement");
+ }
+
+ public void test060(){
+ runTest("multiple conflicting introductions");
+ }
+
+ public void test061(){
+ runTest("referencing non-static pointcuts in outer aspects");
+ }
+
+ public void test062(){
+ runTest("javac correct compiler error if there is no return in around returning result");
+ }
+
+ public void test063(){
+ runTest("should give an error for introducing two members with the same name");
+ }
+
+ public void test064(){
+ runTest("wimpy test for undeclared and uncaught exceptions");
+ }
+
+ public void test065(){
+ runTest("Given non-matching TypePattern, CE flags use of non-introduced method rather than failure to introduce");
+ }
- public void test014(){
- runTest("Non-static advice silently ignored");
- }
+ public void test066(){
+ runTest("Compiler should suggest using aspect when advice, pointcuts, or introduction is in a class");
+ }
- public void test015(){
- runTest("extra closing brace");
- }
+ public void test067(){
+ runTest("declare error working with pointcut and-not (amp,amp,bang)");
+ }
- public void test016(){
- runTest("decent errors for around return type not matching target point");
- }
+ public void test068(){
+ runTest("aspect as member of interface (private and protected)");
+ }
- public void test017(){
- runTest("eachobject: can't call new on an aspect of");
- }
+ public void test069(){
+ runTest("introduced inner interfaces - compile should fail to bind interface name outside of Aspect or if implementing method is not public");
+ }
- public void test018(){
- runTest("eachobject: only zero-argument constructors allowed in an aspect");
- }
+ public void test070(){
+ runTest("aspects may not implement Serializable or Cloneable");
+ }
- public void test019(){
- runTest("eachobject: can't extend a concrete aspect");
- }
+ public void test071(){
+ runTest("explicit constructor calls can throw exceptions");
+ }
- public void test020(){
- runTest("instanceof used without a class");
- }
-
- public void test021(){
- runTest("wildcard used for returns clause");
- }
-
- public void test022(){
- runTest("no return statement in around advice");
- }
-
- public void test023(){
- runTest("inner aspects must be static (no longer matches PR#286)");
- }
-
- public void test024(){
- runTest("Casting class declarations as interfaces");
- }
-
- public void test025(){
- runTest("omits a variable name and crashes with a null pointer");
- }
-
- public void test026(){
- runTest("Not generating an error for using new as a method name");
- }
-
- public void test027(){
- runTest("ClassCastException on the int literal");
- }
-
- public void test028(){
- runTest("Wrong strictfp keyword usage in interface function prototype [TODO: move to errors]");
- }
-
- public void test029(){
- runTest("Wrong strictfp keyword usage in field declaration [TODO: move to errors]");
- }
-
- public void test030(){
- runTest("Wrong strictfp keyword usage in constructor declaration [TODO: move to errors]");
- }
-
- public void test031(){
- runTest("Incorrect static casts to primitively foldable arguments should not crash the compiler.");
- }
-
- public void test032(){
- runTest("Dominates with commas should signal an error.");
- }
-
- public void test033(){
- runTest("stack overflow with recursive crosscut specifier");
- }
-
- public void test034(){
- runTest("Throwing a NullPointerException when formals can't be bound in named pointcut");
- }
-
- public void test035(){
- runTest("disallow defining more than one pointcut with the same name");
- }
-
- public void test036(){
- runTest("pre 0.7 introduction form outside aspect body causes an EmptyStackException");
- }
-
- public void test037(){
- runTest("a class can't extend an aspect");
- }
-
- public void test038(){
- runTest("a before() clause at the class-level causes an EmptyStackException");
- }
-
- public void test039(){
- runTest("an after() clause at the class-level causes an EmptyStackException");
- }
-
- public void test040(){
- runTest("an around() clause at the class-level causes an EmptyStackException");
- }
-
- public void test041(){
- runTest("Doesn't detect cyclic inheritance of aspects.");
- }
-
- public void test042(){
- runTest("Binds the pointcut formals to member variables instead of pointcut formals.");
- }
-
- public void test043(){
- runTest("ambiguous formal in formals pattern");
- }
-
- public void test044(){
- runTest("good error for field name instead of type name");
- }
-
- public void test045(){
- runTest("errors in aspect inheritance - 1");
- }
-
- public void test046(){
- runTest("errors in aspect inheritance - 2");
- }
-
- public void test047(){
- runTest("errors in aspect inheritance - 3");
- }
-
- public void test048(){
- runTest("errors in aspect inheritance - 4");
- }
-
- public void test049(){
- runTest("circular dominates leading to irresolvable advice precedence");
- }
-
- public void test050(){
- runTest("Should issue an error for using 'class' instead of 'aspect'");
- }
-
- public void test051(){
- runTest("Should signal an error when we need an exposed value but don't provide it");
- }
-
- public void test052(){
- runTest("StackOverFlowException with circular +implements's.");
- }
-
- public void test053(){
- runTest("Introducing protected methods is causing a crash");
- }
-
- public void test054(){
- runTest("Introducing protected fields is causing a crash");
- }
-
- public void test055(){
- runTest("two classes with the same fully-qualified names [eachjvm]");
- }
-
- public void test056(){
- runTest("Undefined pointcuts were throwing exceptions in 07b11 [callsto]");
- }
-
- public void test057(){
- runTest("advice on abstract pointcuts");
- }
-
- public void test058(){
- runTest("Whoops, I forgot to put a class in the field access PCD.");
- }
-
- public void test059(){
- runTest("the arounds return something but there is no returns statement");
- }
-
- public void test060(){
- runTest("multiple conflicting introductions");
- }
-
- public void test061(){
- runTest("referencing non-static pointcuts in outer aspects");
- }
-
- public void test062(){
- runTest("javac correct compiler error if there is no return in around returning result");
- }
-
- public void test063(){
- runTest("should give an error for introducing two members with the same name");
- }
-
- public void test064(){
- runTest("wimpy test for undeclared and uncaught exceptions");
- }
-
- public void test065(){
- runTest("Given non-matching TypePattern, CE flags use of non-introduced method rather than failure to introduce");
- }
-
- public void test066(){
- runTest("Compiler should suggest using aspect when advice, pointcuts, or introduction is in a class");
- }
-
- public void test067(){
- runTest("declare error working with pointcut and-not (amp,amp,bang)");
- }
-
- public void test068(){
- runTest("aspect as member of interface (private and protected)");
- }
-
- public void test069(){
- runTest("introduced inner interfaces - compile should fail to bind interface name outside of Aspect or if implementing method is not public");
- }
-
- public void test070(){
- runTest("aspects may not implement Serializable or Cloneable");
- }
-
- public void test071(){
- runTest("explicit constructor calls can throw exceptions");
- }
-
- public void test072(){
- runTest("bad proceed args good error messages");
- }
+ public void test072(){
+ runTest("bad proceed args good error messages");
+ }
}
diff --git a/tests/src/test/java/org/aspectj/tests/TestsModuleTests.java b/tests/src/test/java/org/aspectj/tests/TestsModuleTests.java
index da75267b2..1232f3909 100644
--- a/tests/src/test/java/org/aspectj/tests/TestsModuleTests.java
+++ b/tests/src/test/java/org/aspectj/tests/TestsModuleTests.java
@@ -9,14 +9,14 @@ import org.aspectj.util.LangUtil;
/* *******************************************************************
* Copyright (c) 2005 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://eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wes Isberg initial implementation
+ * 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://eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wes Isberg initial implementation
* ******************************************************************/
import junit.framework.Test;
@@ -30,14 +30,14 @@ public class TestsModuleTests extends TestCase {
TestSuite suite = new TestSuite(name);
// compiler tests, wrapped for JUnit
if (LangUtil.is19VMOrGreater()) {
- suite.addTest(AllTests19.suite());
+ suite.addTest(AllTests19.suite());
} else if (LangUtil.is18VMOrGreater()) {
- suite.addTest(AllTests18.suite());
+ suite.addTest(AllTests18.suite());
} else if (LangUtil.is15VMOrGreater()) {
// suite.addTest(AllTests15.suite());
suite.addTest(AllTests17.suite()); // there are currently (28/11/06) no tests specific to a 1.6/1.7 vm - so we can do
- // this
- } else if (LangUtil.is14VMOrGreater()) {
+ // this
+ } else if (LangUtil.is1dot4VMOrGreater()) {
System.err.println("Skipping tests for 1.5");
// suite.addTest(TestUtil.skipTest("for 1.5"));
suite.addTest(AllTests14.suite());
diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc150/ajc150.xml
index 9eda00b0c..98029d475 100644
--- a/tests/src/test/resources/org/aspectj/systemtest/ajc150/ajc150.xml
+++ b/tests/src/test/resources/org/aspectj/systemtest/ajc150/ajc150.xml
@@ -3813,46 +3813,64 @@
<stdout>
<line text="target-ok an X execution(void X.foo())"/>
<line text="@this-ok @MyAnnotation(value=my-value) execution(void X.foo())" vm="1.5,1.6,1.7,1.8"/>
- <line text="@this-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void X.foo())" vm="9+"/>
+ <line text="@this-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void X.foo())" vm="9,10,11,12,13"/>
+ <line text="@this-ok @MyAnnotation(&quot;my-value&quot;) execution(void X.foo())" vm="14+"/>
<line text="@target-ok @MyAnnotation(value=my-value) execution(void X.foo())" vm="1.5,1.6,1.7,1.8"/>
- <line text="@target-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void X.foo())" vm="9+"/>
+ <line text="@target-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void X.foo())" vm="9,10,11,12,13"/>
+ <line text="@target-ok @MyAnnotation(&quot;my-value&quot;) execution(void X.foo())" vm="14+"/>
<line text="@within-ok @MyAnnotation(value=my-value) execution(void X.foo())" vm="1.5,1.6,1.7,1.8"/>
- <line text="@within-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void X.foo())" vm="9+"/>
+ <line text="@within-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void X.foo())" vm="9,10,11,12,13"/>
+ <line text="@within-ok @MyAnnotation(&quot;my-value&quot;) execution(void X.foo())" vm="14+"/>
<line text="cflow-ok an X a Y set(Y X.y)"/>
<line text="@annotation-ok-sub @MyAnnotation(value=bar) execution(void X.bar())" vm="1.5,1.6,1.7,1.8"/>
- <line text="@annotation-ok-sub @MyAnnotation(value=&quot;bar&quot;) execution(void X.bar())" vm="9+"/>
+ <line text="@annotation-ok-sub @MyAnnotation(value=&quot;bar&quot;) execution(void X.bar())" vm="9,10,11,12,13"/>
+ <line text="@annotation-ok-sub @MyAnnotation(&quot;bar&quot;) execution(void X.bar())" vm="14+"/>
<line text="@annotation-ok @MyAnnotation(value=bar) execution(void X.bar())" vm="1.5,1.6,1.7,1.8"/>
- <line text="@annotation-ok @MyAnnotation(value=&quot;bar&quot;) execution(void X.bar())" vm="9+"/>
+ <line text="@annotation-ok @MyAnnotation(value=&quot;bar&quot;) execution(void X.bar())" vm="9,10,11,12,13"/>
+ <line text="@annotation-ok @MyAnnotation(&quot;bar&quot;) execution(void X.bar())" vm="14+"/>
<line text="target-ok an X execution(void X.bar())"/>
<line text="@this-ok @MyAnnotation(value=my-value) execution(void X.bar())" vm="1.5,1.6,1.7,1.8"/>
- <line text="@this-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void X.bar())" vm="9+"/>
+ <line text="@this-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void X.bar())" vm="9,10,11,12,13"/>
+ <line text="@this-ok @MyAnnotation(&quot;my-value&quot;) execution(void X.bar())" vm="14+"/>
<line text="@target-ok @MyAnnotation(value=my-value) execution(void X.bar())" vm="1.5,1.6,1.7,1.8"/>
- <line text="@target-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void X.bar())" vm="9+"/>
+ <line text="@target-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void X.bar())" vm="9,10,11,12,13"/>
+ <line text="@target-ok @MyAnnotation(&quot;my-value&quot;) execution(void X.bar())" vm="14+"/>
<line text="@within-ok @MyAnnotation(value=my-value) execution(void X.bar())" vm="1.5,1.6,1.7,1.8"/>
- <line text="@within-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void X.bar())" vm="9+"/>
+ <line text="@within-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void X.bar())" vm="9,10,11,12,13"/>
+ <line text="@within-ok @MyAnnotation(&quot;my-value&quot;) execution(void X.bar())" vm="14+"/>
<line text="@args-ok @MyAnnotation(value=my-value) execution(void Y.foo(X))" vm="1.5,1.6,1.7,1.8"/>
- <line text="@args-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void Y.foo(X))" vm="9+"/>
+ <line text="@args-ok @MyAnnotation(value=&quot;my-value&quot;) execution(void Y.foo(X))" vm="9,10,11,12,13"/>
+ <line text="@args-ok @MyAnnotation(&quot;my-value&quot;) execution(void Y.foo(X))" vm="14+"/>
<line text="args-ok an X execution(void Y.foo(X))"/>
<line text="this-ok a Y execution(void Y.foo(X))"/>
<line text="@this-ok @MyAnnotation(value=on Y) execution(void Y.foo(X))" vm="1.5,1.6,1.7,1.8"/>
- <line text="@this-ok @MyAnnotation(value=&quot;on Y&quot;) execution(void Y.foo(X))" vm="9+"/>
+ <line text="@this-ok @MyAnnotation(value=&quot;on Y&quot;) execution(void Y.foo(X))" vm="9,10,11,12,13"/>
+ <line text="@this-ok @MyAnnotation(&quot;on Y&quot;) execution(void Y.foo(X))" vm="14+"/>
<line text="@target-ok @MyAnnotation(value=on Y) execution(void Y.foo(X))" vm="1.5,1.6,1.7,1.8"/>
- <line text="@target-ok @MyAnnotation(value=&quot;on Y&quot;) execution(void Y.foo(X))" vm="9+"/>
+ <line text="@target-ok @MyAnnotation(value=&quot;on Y&quot;) execution(void Y.foo(X))" vm="9,10,11,12,13"/>
+ <line text="@target-ok @MyAnnotation(&quot;on Y&quot;) execution(void Y.foo(X))" vm="14+"/>
<line text="@within-ok @MyAnnotation(value=on Y) execution(void Y.foo(X))" vm="1.5,1.6,1.7,1.8"/>
- <line text="@within-ok @MyAnnotation(value=&quot;on Y&quot;) execution(void Y.foo(X))" vm="9+"/>
+ <line text="@within-ok @MyAnnotation(value=&quot;on Y&quot;) execution(void Y.foo(X))" vm="9,10,11,12,13"/>
+ <line text="@within-ok @MyAnnotation(&quot;on Y&quot;) execution(void Y.foo(X))" vm="14+"/>
<line text="@annotation-ok-sub @MyAnnotation(value=my-value) execution(X Y.bar())" vm="1.5,1.6,1.7,1.8"/>
- <line text="@annotation-ok-sub @MyAnnotation(value=&quot;my-value&quot;) execution(X Y.bar())" vm="9+"/>
+ <line text="@annotation-ok-sub @MyAnnotation(value=&quot;my-value&quot;) execution(X Y.bar())" vm="9,10,11,12,13"/>
+ <line text="@annotation-ok-sub @MyAnnotation(&quot;my-value&quot;) execution(X Y.bar())" vm="14+"/>
<line text="@annotation-ok @MyAnnotation(value=my-value) execution(X Y.bar())" vm="1.5,1.6,1.7,1.8"/>
- <line text="@annotation-ok @MyAnnotation(value=&quot;my-value&quot;) execution(X Y.bar())" vm="9+"/>
+ <line text="@annotation-ok @MyAnnotation(value=&quot;my-value&quot;) execution(X Y.bar())" vm="9,10,11,12,13"/>
+ <line text="@annotation-ok @MyAnnotation(&quot;my-value&quot;) execution(X Y.bar())" vm="14+"/>
<line text="this-ok a Y execution(X Y.bar())"/>
<line text="@this-ok @MyAnnotation(value=on Y) execution(X Y.bar())" vm="1.5,1.6,1.7,1.8"/>
- <line text="@this-ok @MyAnnotation(value=&quot;on Y&quot;) execution(X Y.bar())" vm="9+"/>
+ <line text="@this-ok @MyAnnotation(value=&quot;on Y&quot;) execution(X Y.bar())" vm="9,10,11,12,13"/>
+ <line text="@this-ok @MyAnnotation(&quot;on Y&quot;) execution(X Y.bar())" vm="14+"/>
<line text="@target-ok @MyAnnotation(value=on Y) execution(X Y.bar())" vm="1.5,1.6,1.7,1.8"/>
- <line text="@target-ok @MyAnnotation(value=&quot;on Y&quot;) execution(X Y.bar())" vm="9+"/>
+ <line text="@target-ok @MyAnnotation(value=&quot;on Y&quot;) execution(X Y.bar())" vm="9,10,11,12,13"/>
+ <line text="@target-ok @MyAnnotation(&quot;on Y&quot;) execution(X Y.bar())" vm="14+"/>
<line text="@within-ok @MyAnnotation(value=on Y) execution(X Y.bar())" vm="1.5,1.6,1.7,1.8"/>
- <line text="@within-ok @MyAnnotation(value=&quot;on Y&quot;) execution(X Y.bar())" vm="9+"/>
+ <line text="@within-ok @MyAnnotation(value=&quot;on Y&quot;) execution(X Y.bar())" vm="9,10,11,12,13"/>
+ <line text="@within-ok @MyAnnotation(&quot;on Y&quot;) execution(X Y.bar())" vm="14+"/>
<line text="@withincode-ok @MyAnnotation(value=my-value) get(X Y.x)" vm="1.5,1.6,1.7,1.8"/>
- <line text="@withincode-ok @MyAnnotation(value=&quot;my-value&quot;) get(X Y.x)" vm="9+"/>
+ <line text="@withincode-ok @MyAnnotation(value=&quot;my-value&quot;) get(X Y.x)" vm="9,10,11,12,13"/>
+ <line text="@withincode-ok @MyAnnotation(&quot;my-value&quot;) get(X Y.x)" vm="14+"/>
</stdout>
</run>
</ajc-test>
diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc151/ajc151.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc151/ajc151.xml
index 279c56e04..8d8cd66b8 100644
--- a/tests/src/test/resources/org/aspectj/systemtest/ajc151/ajc151.xml
+++ b/tests/src/test/resources/org/aspectj/systemtest/ajc151/ajc151.xml
@@ -92,8 +92,10 @@
<compile files="Failing.java" options="-1.5"/>
<run class="Failing">
<stderr>
- <line text="On TestInterface:@TestAnnotation(value=true)"/>
- <line text="On Failing:@TestAnnotation(value=true)"/>
+ <line text="On TestInterface:@TestAnnotation(value=true)" vm="1.5,1.6,1.7,1.8,9,10,11,12,13"/>
+ <line text="On TestInterface:@TestAnnotation(true)" vm="14+"/>
+ <line text="On Failing:@TestAnnotation(value=true)" vm="1.5,1.6,1.7,1.8,9,10,11,12,13"/>
+ <line text="On Failing:@TestAnnotation(true)" vm="14+"/>
</stderr>
</run>
</ajc-test>
@@ -102,8 +104,10 @@
<compile files="Failing2.java" options="-1.5"/>
<run class="Failing2">
<stderr>
- <line text="On TestInterface:@TestAnnotation(value=true)"/>
- <line text="On Failing2:@TestAnnotation(value=true)"/>
+ <line text="On TestInterface:@TestAnnotation(value=true)" vm="1.5,1.6,1.7,1.8,9,10,11,12,13"/>
+ <line text="On TestInterface:@TestAnnotation(true)" vm="14+"/>
+ <line text="On Failing2:@TestAnnotation(value=true)" vm="1.5,1.6,1.7,1.8,9,10,11,12,13"/>
+ <line text="On Failing2:@TestAnnotation(true)" vm="14+"/>
</stderr>
</run>
</ajc-test>
diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc169/intertype.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc169/intertype.xml
index 75846b05c..185e3084c 100644
--- a/tests/src/test/resources/org/aspectj/systemtest/ajc169/intertype.xml
+++ b/tests/src/test/resources/org/aspectj/systemtest/ajc169/intertype.xml
@@ -71,7 +71,8 @@
<stdout>
<line text="wibble"/>
<line text="@a.b.c.RelatedType(value=class a.b.c.Vote$_$choice)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
- <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9+"/>
+ <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9,10,11,12,13"/>
+ <line text="@a.b.c.RelatedType(a.b.c.Vote$_$choice.class)" vm="14+"/>
</stdout>
</run>
</ajc-test>
@@ -82,7 +83,8 @@
<stdout>
<line text="wibble"/>
<line text="@a.b.c.RelatedType(value=class a.b.c.Vote$_$choice)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
- <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9+"/>
+ <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9,10,11,12,13"/>
+ <line text="@a.b.c.RelatedType(a.b.c.Vote$_$choice.class)" vm="14+"/>
</stdout>
</run>
</ajc-test>
@@ -93,7 +95,8 @@
<stdout>
<line text="wibble"/>
<line text="@a.b.c.RelatedType(value=class a.b.c.Vote$_$choice)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
- <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9+"/>
+ <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9,10,11,12,13"/>
+ <line text="@a.b.c.RelatedType(a.b.c.Vote$_$choice.class)" vm="14+"/>
</stdout>
</run>
</ajc-test>
@@ -104,7 +107,8 @@
<stdout>
<line text="wibble"/>
<line text="@a.b.c.RelatedType(value=class a.b.c.Vote$_$choice)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
- <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9+"/>
+ <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9,10,11,12,13"/>
+ <line text="@a.b.c.RelatedType(a.b.c.Vote$_$choice.class)" vm="14+"/>
</stdout>
</run>
</ajc-test>
@@ -115,7 +119,8 @@
<stdout>
<line text="wibble"/>
<line text="@a.b.c.RelatedType(value=class a.b.c.Vote$_$choice)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
- <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9+"/>
+ <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9,10,11,12,13"/>
+ <line text="@a.b.c.RelatedType(a.b.c.Vote$_$choice.class)" vm="14+"/>
</stdout>
</run>
</ajc-test>
@@ -126,7 +131,8 @@
<stdout>
<line text="wibble"/>
<line text="@a.b.c.RelatedType(value=class a.b.c.Vote$_$choice)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
- <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9+"/>
+ <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_$choice.class)" vm="9,10,11,12,13"/>
+ <line text="@a.b.c.RelatedType(a.b.c.Vote$_$choice.class)" vm="14+"/>
</stdout>
</run>
</ajc-test>
@@ -137,7 +143,8 @@
<stdout>
<line text="wibble"/>
<line text="@a.b.c.RelatedType(value=class a.b.c.Vote$_)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
- <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_.class)" vm="9+"/>
+ <line text="@a.b.c.RelatedType(value=a.b.c.Vote$_.class)" vm="9,10,11,12,13"/>
+ <line text="@a.b.c.RelatedType(a.b.c.Vote$_.class)" vm="14+"/>
</stdout>
</run>
</ajc-test>
diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc170/ajc170.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc170/ajc170.xml
index e379d6cab..f372197c0 100644
--- a/tests/src/test/resources/org/aspectj/systemtest/ajc170/ajc170.xml
+++ b/tests/src/test/resources/org/aspectj/systemtest/ajc170/ajc170.xml
@@ -184,7 +184,8 @@
<line text="@AnnoBoolean(value=true, zzz=false)"/>
<line text="@AnnoClass(value=class java.lang.Integer, ccc=class java.lang.String)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
<line text="@AnnoClass(value=java.lang.Integer.class, ccc=java.lang.String.class)" vm="9+"/>
- <line text="@AnnoLong(value=999, jjj=111)"/>
+ <line text="@AnnoLong(value=999L, jjj=111L)" vm="14+"/>
+ <line text="@AnnoLong(value=999, jjj=111)" vm="1.2,1.3,1.4,1.5,1.6,1.6,1.8,9,10,11,12,13"/>
<line text="@AnnoString(value=set from xml, sss=xyz)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
<line text="@AnnoString(value=&quot;set from xml&quot;, sss=&quot;xyz&quot;)" vm="9+"/>
<line text="Annotations on field2? true"/>
@@ -209,7 +210,8 @@
<line text="@AnnoShort(value=8, sss=3)"/>
<line text="Annotations on field2? true"/>
<line text="Annotation count is 2"/>
- <line text="@AnnoByte(value=88, bbb=66)"/>
+ <line text="@AnnoByte(value=88, bbb=66)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8,9,10,11,12,13"/>
+ <line text="@AnnoByte(value=(byte)0x58, bbb=(byte)0x42)" vm="14+"/>
<line text="@AnnoInt(iii=111, value=99)"/>
</stdout>
</run>
diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc174/ajc174.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc174/ajc174.xml
index 456fb412f..00a0166fa 100644
--- a/tests/src/test/resources/org/aspectj/systemtest/ajc174/ajc174.xml
+++ b/tests/src/test/resources/org/aspectj/systemtest/ajc174/ajc174.xml
@@ -99,7 +99,8 @@
<run class="Target4">
<stdout>
<line text="1"/>
- <line text="@Tagged(value=31)"/>
+ <line text="@Tagged(value=31)" vm="1.5,1.6,1.7,1.8,9,10,11,12,13"/>
+ <line text="@Tagged(31)" vm="14+"/>
</stdout>
</run>
</ajc-test>
diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc193/ajc193.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc193/ajc193.xml
index cea315f82..2a4be40f8 100644
--- a/tests/src/test/resources/org/aspectj/systemtest/ajc193/ajc193.xml
+++ b/tests/src/test/resources/org/aspectj/systemtest/ajc193/ajc193.xml
@@ -51,46 +51,6 @@ Method call
</run>
</ajc-test>
- <!-- with the release of 13 this behaviour seems to have moved from 12 to 13?? -->
- <ajc-test dir="features193" vm="13" title="switch 1">
- <compile files="Switch1.java" options="-13 --enable-preview">
- </compile>
- <run class="Switch1" vmargs="--enable-preview">
- <stdout>
- <line text="0"/>
- <line text="1"/>
- <line text="2"/>
- <line text="3"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="features193" vm="13" title="switch 2">
- <compile files="Switch2.java" options="--enable-preview -source 13">
- </compile>
- <run class="Switch2" vmargs="--enable-preview">
- <stdout>
- <line text="0"/>
- <line text="2"/>
- <line text="4"/>
- <line text="6"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="features193" vm="13" title="switch 3">
- <compile files="Switch3.java" options="--enable-preview -source 13">
- </compile>
- <run class="Switch3" vmargs="--enable-preview">
- <stdout>
- <line text="3"/>
- <line text="6"/>
- <line text="9"/>
- <line text="12"/>
- </stdout>
- </run>
- </ajc-test>
-
<ajc-test dir="bugs193/543657" vm="1.8" title="overweaving decm - reweaving">
<compile files="MoodIndicator.java,Code1.java" options="-showWeaveInfo -1.8" outjar="one.jar">
<message kind="weave" text="Mixing interface 'MoodIndicator$Moody' (MoodIndicator.java) into type 'Code1' (Code1.java)"/>
diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc195/ajc195.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc195/ajc195.xml
index d9d679859..9b109a3f1 100644
--- a/tests/src/test/resources/org/aspectj/systemtest/ajc195/ajc195.xml
+++ b/tests/src/test/resources/org/aspectj/systemtest/ajc195/ajc195.xml
@@ -103,31 +103,6 @@
</run>
</ajc-test>
-
- <ajc-test dir="features195/textblock" vm="13" title="textblock 1">
- <compile files="Code.java" options="--enable-preview -source 13">
- </compile>
- <run class="Code" vmargs="--enable-preview">
- <stdout>
- <line text="this is a text"/>
- <!-- the incidental space is removed with a trim in output matching but the test app doesn't remove it when printing it, why? -->
- <line text="block"/>
- <line text=""/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="features195/textblock" vm="13" title="textblock 2">
- <compile files="Code2.java" options="--enable-preview -source 13">
- </compile>
- <run class="Code2" vmargs="--enable-preview">
- <stdout>
- <!-- why is the incidental space not removed here?? -->
- <line text="this is a text"/>
- <line text="block in advice"/>
- <line text=""/>
- </stdout>
- </run>
- </ajc-test>
+
</suite>
diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc196/ajc196.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc196/ajc196.xml
new file mode 100644
index 000000000..cd5a4870a
--- /dev/null
+++ b/tests/src/test/resources/org/aspectj/systemtest/ajc196/ajc196.xml
@@ -0,0 +1,118 @@
+<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
+
+<suite>
+
+ <!-- switch now in Java14 and doesn't need -enable-preview flag -->
+ <ajc-test dir="features193" vm="14" title="switch 1">
+ <compile files="Switch1.java" options="-14">
+ </compile>
+ <run class="Switch1" vmargs="--enable-preview">
+ <stdout>
+ <line text="0" />
+ <line text="1" />
+ <line text="2" />
+ <line text="3" />
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="features193" vm="14" title="switch 2">
+ <compile files="Switch2.java" options="-source 14">
+ </compile>
+ <run class="Switch2" vmargs="">
+ <stdout>
+ <line text="0" />
+ <line text="2" />
+ <line text="4" />
+ <line text="6" />
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="features193" vm="14" title="switch 3">
+ <compile files="Switch3.java" options="-source 14">
+ </compile>
+ <run class="Switch3" vmargs="">
+ <stdout>
+ <line text="3" />
+ <line text="6" />
+ <line text="9" />
+ <line text="12" />
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs196/java14" vm="14" title="simple record">
+ <compile files="Person.java" options="--enable-preview -14" />
+ </ajc-test>
+
+ <ajc-test dir="bugs196/java14" vm="14" title="using a record">
+ <compile files="Person.java UsingPersonRecord.java"
+ options="--enable-preview -14" />
+ <run class="UsingPersonRecord" vmargs="--enable-preview">
+ <stdout>
+ <line text="Person[firstName=A, lastName=B, age=99]" />
+ <line text="A" />
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs196/java14" vm="14"
+ title="instanceof patterns">
+ <compile files="Jep305.java" options="--enable-preview -14" />
+ <run class="Jep305" vmargs="--enable-preview">
+ <stdout>
+ <line text="orange" />
+ <line text="apple" />
+ </stdout>
+ </run>
+ </ajc-test>
+
+
+ <ajc-test dir="bugs196/java14" vm="14"
+ title="advising records">
+ <compile
+ files="TraceRecordComponents.aj Person.java UsingPersonRecord.java"
+ options="--enable-preview -14" />
+ <run class="UsingPersonRecord" vmargs="--enable-preview">
+ <stdout>
+ <line text="execution(String Person.toString())" />
+ <line text="Person[firstName=A, lastName=B, age=99]" />
+ <line text="execution(String Person.firstName())" />
+ <line text="A" />
+ </stdout>
+ </run>
+ </ajc-test>
+
+
+ <!-- textblock still in preview at 14 level -->
+ <ajc-test dir="features195/textblock" vm="14"
+ title="textblock 1">
+ <compile files="Code.java"
+ options="--enable-preview -source 14">
+ </compile>
+ <run class="Code" vmargs="--enable-preview">
+ <stdout>
+ <line text="this is a text" />
+ <!-- the incidental space is removed with a trim in output matching but
+ the test app doesn't remove it when printing it, why? -->
+ <line text="block" />
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="features195/textblock" vm="14"
+ title="textblock 2">
+ <compile files="Code2.java"
+ options="--enable-preview -source 14">
+ </compile>
+ <run class="Code2" vmargs="--enable-preview">
+ <stdout>
+ <!-- why is the incidental space not removed here?? -->
+ <line text="this is a text" />
+ <line text="block in advice" />
+ </stdout>
+ </run>
+ </ajc-test>
+
+</suite>
diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc196/sanity-tests-14.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc196/sanity-tests-14.xml
new file mode 100644
index 000000000..e831c9916
--- /dev/null
+++ b/tests/src/test/resources/org/aspectj/systemtest/ajc196/sanity-tests-14.xml
@@ -0,0 +1,69 @@
+<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
+
+<suite>
+
+ <!-- empty class -->
+ <ajc-test dir="bugs160/simplejava" title="simple - a">
+ <compile files="SimpleA.java" options="-14"/>
+ </ajc-test>
+
+ <!-- class with one method -->
+ <ajc-test dir="bugs160/simplejava" title="simple - b">
+ <compile files="SimpleB.java" options="-14"/>
+ <run class="SimpleB"/>
+ </ajc-test>
+
+ <!-- empty aspect -->
+ <ajc-test dir="bugs160/simplejava" title="simple - c">
+ <compile files="SimpleC.java" options="-13"/>
+ </ajc-test>
+
+ <!-- simple before -->
+ <ajc-test dir="bugs160/simplejava" title="simple - d">
+ <compile files="SimpleD.java" options="-14"/>
+ </ajc-test>
+
+ <!-- simple itd field -->
+ <ajc-test dir="bugs160/simplejava" title="simple - e">
+ <compile files="SimpleE.java" options="-14"/>
+ </ajc-test>
+
+ <!-- aspect with main calling a static method -->
+ <ajc-test dir="bugs160/simplejava" title="simple - f">
+ <compile files="SimpleF.java" options="-14"/>
+ </ajc-test>
+
+ <!-- pertarget -->
+ <ajc-test dir="bugs160/simplejava" title="simple - g">
+ <compile files="SimpleG.java" options="-14"/>
+ </ajc-test>
+
+ <!-- generic ctor itds -->
+ <ajc-test dir="bugs160/simplejava" title="simple - h">
+ <compile files="SimpleH.java" options="-14"/>
+ </ajc-test>
+
+ <!-- overriding generic itd methods -->
+ <ajc-test dir="bugs160/simplejava" title="simple - i">
+ <compile files="SimpleI.java" options="-14"/>
+ </ajc-test>
+
+ <!-- check class file version is 57.0 -->
+ <ajc-test dir="bugs160/simplejava" title="simple - j">
+ <compile files="SimpleJ.java" options="-14"/>
+ </ajc-test>
+
+ <!-- check class file version is 57.0 -->
+ <ajc-test dir="bugs160/simplejava" title="simple - k">
+ <compile files="SimpleJ.java" options="-source 14"/>
+ </ajc-test>
+
+ <!-- check class file version is 49.0 -->
+ <ajc-test dir="bugs160/simplejava" title="simple - m">
+ <compile files="SimpleJ.java" options="-1.5"/>
+ </ajc-test>
+
+ <ajc-test dir="bugs160/simplejava" title="simple - n">
+ <compile files="SimpleN.java" options="-14"/>
+ </ajc-test>
+</suite>