From b84c7a6c91bf33addab0d44a38dae4edfed425bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Mon, 15 Jul 2024 17:42:42 +0300 Subject: [PATCH] Run more tests with Java 23 --- .../jdt/core/tests/compiler/parser/TestAll.java | 13 +++++++++++++ .../jdt/core/tests/util/AbstractCompilerTest.java | 2 ++ 2 files changed, 15 insertions(+) diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java index 2d560be188b..672a48eda8f 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java @@ -280,6 +280,19 @@ public static TestSuite getTestSuite(boolean addComplianceDiagnoseTest) { TestCase.RUN_ONLY_ID = null; all.addTest(AbstractCompilerTest.buildComplianceTestSuite(ClassFileConstants.getComplianceLevelForJavaVersion(ClassFileConstants.MAJOR_VERSION_22), tests_22)); } + if ((possibleComplianceLevels & AbstractCompilerTest.F_23) != 0) { + ArrayList tests_23 = (ArrayList)testClasses.clone(); + tests_23.addAll(TEST_CLASSES_1_5); + addJava16Tests(tests_23); +// tests_22.add(SuperAfterStatementsTest.class); + // Reset forgotten subsets tests + TestCase.TESTS_PREFIX = null; + TestCase.TESTS_NAMES = null; + TestCase.TESTS_NUMBERS= null; + TestCase.TESTS_RANGE = null; + TestCase.RUN_ONLY_ID = null; + all.addTest(AbstractCompilerTest.buildComplianceTestSuite(ClassFileConstants.getComplianceLevelForJavaVersion(ClassFileConstants.MAJOR_VERSION_23), tests_23)); + } return all; } diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/AbstractCompilerTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/AbstractCompilerTest.java index 5fd4fcb6010..0a355368f45 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/AbstractCompilerTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/AbstractCompilerTest.java @@ -55,6 +55,7 @@ public class AbstractCompilerTest extends TestCase { public static final int F_20 = 0x20000; public static final int F_21 = 0x40000; public static final int F_22 = 0x80000; + public static final int F_23 = 0x100000; public static final boolean RUN_JAVAC = CompilerOptions.ENABLED.equals(System.getProperty("run.javac")); public static final boolean PERFORMANCE_ASSERTS = !CompilerOptions.DISABLED.equals(System.getProperty("jdt.performance.asserts")); @@ -103,6 +104,7 @@ public class AbstractCompilerTest extends TestCase { new int[] {F_20, ClassFileConstants.MAJOR_VERSION_20}, new int[] {F_21, ClassFileConstants.MAJOR_VERSION_21}, new int[] {F_22, ClassFileConstants.MAJOR_VERSION_22}, + new int[] {F_23, ClassFileConstants.MAJOR_VERSION_23} }; /**