diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-07-28 10:55:02 +0700 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-09-07 08:44:33 +0200 |
commit | 620add3a3c18dc3e126a03254b6482ad9ab7ef36 (patch) | |
tree | 5a43d8a1db333183ac9e335772088e3c922e35de /testing | |
parent | c80551f1d36e288b4b3be658e70c0560b7e04c9e (diff) | |
download | aspectj-620add3a3c18dc3e126a03254b6482ad9ab7ef36.tar.gz aspectj-620add3a3c18dc3e126a03254b6482ad9ab7ef36.zip |
Add + activate some Java 17 tests
- Fix one fault sanity test configuration
- Deactivate Java 16 preview tests (no longer supported by Java 17
compiler)
- Test sealed classes as final on Java 17 (no longer preview)
- Add tests for JEP 406, pattern matching for switch (preview). At
present, the beta 17 branch of JDT Core does not handle the tested
features and expected compile errors correctly yet, so I had to
temporarily deactivate test execution, only printing TODO messages.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'testing')
-rw-r--r-- | testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava16Only.java | 5 | ||||
-rw-r--r-- | testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava17Only.java | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava16Only.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava16Only.java index 0a4e31b6f..115e01289 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava16Only.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava16Only.java @@ -20,13 +20,13 @@ public abstract class XMLBasedAjcTestCaseForJava16Only extends XMLBasedAjcTestCa @Override public void setUp() throws Exception { // Activate this block after upgrading to JDT Core Java 17 - /* throw new IllegalStateException( "These tests need a Java 16 level AspectJ compiler " + "(e.g. because they use version-specific preview features). " + "This compiler does not support preview features of a previous version anymore." ); - */ + // Activate this block before upgrading to JDT Core Java 17 + /* if (!LangUtil.is16VMOrGreater() || LangUtil.is17VMOrGreater()) { throw new IllegalStateException( "These tests should be run on Java 16 only " + @@ -34,6 +34,7 @@ public abstract class XMLBasedAjcTestCaseForJava16Only extends XMLBasedAjcTestCa ); } super.setUp(); + */ } } diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava17Only.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava17Only.java index e20ee7af7..0c351c69a 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava17Only.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava17Only.java @@ -27,6 +27,7 @@ public abstract class XMLBasedAjcTestCaseForJava17Only extends XMLBasedAjcTestCa "This compiler does not support preview features of a previous version anymore." ); */ + // Activate this block before upgrading to JDT Core Java 18 if (!LangUtil.is17VMOrGreater() || LangUtil.is18VMOrGreater()) { throw new IllegalStateException( "These tests should be run on Java 17 only " + |