aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/test/java/org/aspectj/systemtest/ajc1919
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/test/java/org/aspectj/systemtest/ajc1919')
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc1919/Java19PreviewFeaturesTests.java11
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc1919/SanityTestsJava19.java4
2 files changed, 8 insertions, 7 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc1919/Java19PreviewFeaturesTests.java b/tests/src/test/java/org/aspectj/systemtest/ajc1919/Java19PreviewFeaturesTests.java
index b4dc12f39..1207f5cc6 100644
--- a/tests/src/test/java/org/aspectj/systemtest/ajc1919/Java19PreviewFeaturesTests.java
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc1919/Java19PreviewFeaturesTests.java
@@ -16,18 +16,19 @@ import org.aspectj.testing.XMLBasedAjcTestCaseForJava19Only;
* @author Alexander Kriegisch
*/
public class Java19PreviewFeaturesTests extends XMLBasedAjcTestCaseForJava19Only {
+ private static final Constants.ClassFileVersion classFileVersion = Constants.ClassFileVersion.of(19);
public void testSwitchPatternMatchingPreview3Java() {
runTest("switch pattern matching preview 3 java");
- checkVersion("SwitchPatternPreview3OK", Constants.MAJOR_19, Constants.PREVIEW_MINOR_VERSION);
+ checkVersion("SwitchPatternPreview3OK", classFileVersion.MAJOR, classFileVersion.PREVIEW_MINOR);
}
public void testSwitchPatternMatchingPreview3Aspect() {
runTest("switch pattern matching preview 3 aspect");
- checkVersion("SwitchPatternPreview3Aspect", Constants.MAJOR_19, Constants.PREVIEW_MINOR_VERSION);
- checkVersion("Application", Constants.MAJOR_19, Constants.PREVIEW_MINOR_VERSION);
- checkVersion("Shape", Constants.MAJOR_19, Constants.PREVIEW_MINOR_VERSION);
- checkVersion("S", Constants.MAJOR_19, Constants.PREVIEW_MINOR_VERSION);
+ checkVersion("SwitchPatternPreview3Aspect", classFileVersion.MAJOR, classFileVersion.PREVIEW_MINOR);
+ checkVersion("Application", classFileVersion.MAJOR, classFileVersion.PREVIEW_MINOR);
+ checkVersion("Shape", classFileVersion.MAJOR, classFileVersion.PREVIEW_MINOR);
+ checkVersion("S", classFileVersion.MAJOR, classFileVersion.PREVIEW_MINOR);
}
public void testSwitchPatternMatchingCaseLabelDominatedByPrecedingError() {
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc1919/SanityTestsJava19.java b/tests/src/test/java/org/aspectj/systemtest/ajc1919/SanityTestsJava19.java
index a8a3826ea..9f70c3ff2 100644
--- a/tests/src/test/java/org/aspectj/systemtest/ajc1919/SanityTestsJava19.java
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc1919/SanityTestsJava19.java
@@ -21,7 +21,7 @@ import org.aspectj.testing.XMLBasedAjcTestCaseForJava19OrLater;
*/
public class SanityTestsJava19 extends XMLBasedAjcTestCaseForJava19OrLater {
- public static final int bytecode_version_for_JDK_level = Constants.MAJOR_19;
+ public static final int bytecode_version_for_JDK_level = Constants.ClassFileVersion.of(19).MAJOR;
// Incredibly trivial test programs that check the compiler works at all (these are easy-ish to debug)
public void testSimpleJava_A() {
@@ -73,7 +73,7 @@ public class SanityTestsJava19 extends XMLBasedAjcTestCaseForJava19OrLater {
public void testVersionCorrect4() {
runTest("simple - m");
// Must be 49.0 when -1.5 is specified
- checkVersion("A", Constants.MAJOR_1_5, 0);
+ checkVersion("A", Constants.ClassFileVersion.of(5).MAJOR, 0);
}
public static Test suite() {