Skip to content

Commit 7350625

Browse files
committed
[26] Fixing the omissions in test infra delta for running with 26
versions (including ea)
1 parent 41b837c commit 7350625

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
*
99
* SPDX-License-Identifier: EPL-2.0
1010
*
11+
* This is an implementation of an early-draft specification developed under the Java
12+
* Community Process (JCP) and is made available for testing and evaluation purposes
13+
* only. The code is not compatible with any specification of the JCP.
14+
*
1115
* Contributors:
1216
* IBM Corporation - initial API and implementation
1317
* Stephan Herrmann - Contribution for
@@ -342,6 +346,8 @@ static String versionFromRawVersion(String rawVersion, String javacPathName) {
342346
return JavaCore.VERSION_24;
343347
} else if(rawVersion.startsWith("25")) {
344348
return JavaCore.VERSION_25;
349+
} else if(rawVersion.startsWith("26")) {
350+
return JavaCore.VERSION_26;
345351
} else {
346352
throw new RuntimeException("unknown javac version: " + rawVersion);
347353
}
@@ -590,6 +596,16 @@ static int minorFromRawVersion (String version, String rawVersion) {
590596
switch(rawVersion) {
591597
case "25-ea", "25-beta", "25":
592598
return 0000;
599+
case "25.0.1":
600+
return 0100;
601+
case "25.0.2":
602+
return 0200;
603+
}
604+
}
605+
if (version == JavaCore.VERSION_26) {
606+
switch(rawVersion) {
607+
case "26-ea", "26-beta", "26":
608+
return 0000;
593609
}
594610
}
595611
throw new RuntimeException("unknown raw javac version: " + rawVersion);

org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,11 @@ public static Test suite() {
263263
since_25.add(ModuleImportTests.class);
264264
since_25.add(SuperAfterStatementsTest.class);
265265
since_25.add(ImplicitlyDeclaredClassesTest.class);
266-
since_25.add(PrimitiveInPatternsTest.class);
267-
since_25.add(PrimitiveInPatternsTestSH.class);
268266

269267
ArrayList since_26 = new ArrayList();
270268
since_26.add(PreviewFlagTest.class);
269+
since_26.add(PrimitiveInPatternsTest.class);
270+
since_26.add(PrimitiveInPatternsTestSH.class);
271271

272272
record TestsAddition(ArrayList newTests, long testLevel, long jdkVersion) {}
273273

0 commit comments

Comments
 (0)