Skip to content

Commit 298e4be

Browse files
committed
run compiler tests only for Java 8, Java 11, and runtime version
1 parent abdd70c commit 298e4be

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

base-test/org.eclipse.jdt.groovy.core.tests.compiler/src/org/eclipse/jdt/groovy/core/tests/basic/GroovyCompilerTestSuite.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import java.net.URL;
2222
import java.util.ArrayList;
2323
import java.util.Arrays;
24-
import java.util.Collections;
2524
import java.util.List;
2625
import java.util.Map;
2726

@@ -78,14 +77,14 @@ public abstract class GroovyCompilerTestSuite {
7877
protected static final long JDK14 = (58L << 16) + ClassFileConstants.MINOR_VERSION_0;
7978
protected static final long JDK15 = (59L << 16) + ClassFileConstants.MINOR_VERSION_0;
8079
protected static final long JDK16 = (60L << 16) + ClassFileConstants.MINOR_VERSION_0;
81-
protected static final List<Long> JDKs = Collections.unmodifiableList(Arrays.asList(JDK8, JDK9, JDK10, JDK11, JDK12, JDK13, JDK14, JDK15, JDK16));
80+
protected static final long JDK17 = (60L << 17) + ClassFileConstants.MINOR_VERSION_0;
8281

8382
@Parameters(name = "Java {1}")
8483
public static Iterable<Object[]> params() {
8584
long javaSpec = CompilerOptions.versionToJdkLevel(System.getProperty("java.specification.version"));
8685
List<Object[]> params = new ArrayList<>();
87-
for (long jdk : JDKs) {
88-
if (jdk <= javaSpec) {
86+
for (long jdk : new long[] {JDK8, JDK9, JDK10, JDK11, JDK12, JDK13, JDK14, JDK15, JDK16, JDK17}) {
87+
if (jdk == javaSpec || (jdk < javaSpec && (jdk == JDK8 || jdk == JDK11))) { // current and LTS
8988
params.add(new Object[] {jdk, CompilerOptions.versionFromJdkLevel(jdk)});
9089
}
9190
}

0 commit comments

Comments
 (0)