Bug 575835 - [BETA_JAVA17] 20 test failures in jdt.core with java 16
test run
Change-Id: Id98127ea500b2efa2457b8eb2891a1a23a26c605
Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/185048
Tested-by: JDT Bot <jdt-bot@eclipse.org>
Reviewed-by: Manoj Palat <manpalat@in.ibm.com>
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LocalStaticsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LocalStaticsTest.java
index 05582b9..4241dae 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LocalStaticsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LocalStaticsTest.java
@@ -40,7 +40,7 @@
return LocalStaticsTest.class;
}
public static Test suite() {
- return buildMinimalComplianceTestSuite(testClass(), F_17);
+ return buildMinimalComplianceTestSuite(testClass(), F_16);
}
public LocalStaticsTest(String testName){
super(testName);
@@ -49,10 +49,9 @@
// Enables the tests to run individually
protected Map<String, String> getCompilerOptions() {
Map<String, String> defaultOptions = super.getCompilerOptions();
- defaultOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_17); // FIXME
- defaultOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_17);
- defaultOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_17);
- defaultOptions.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
+ defaultOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_16); // FIXME
+ defaultOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_16);
+ defaultOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_16);
defaultOptions.put(CompilerOptions.OPTION_ReportPreviewFeatures, CompilerOptions.IGNORE);
defaultOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
return defaultOptions;
@@ -70,12 +69,11 @@
runner.expectedOutputString = expectedOutput;
runner.vmArguments = new String[] {"--enable-preview"};
runner.customOptions = customOptions;
- runner.javacTestOptions = JavacTestOptions.forReleaseWithPreview("17");
runner.runConformTest();
}
@Override
protected void runNegativeTest(String[] testFiles, String expectedCompilerLog) {
- runNegativeTest(testFiles, expectedCompilerLog, JavacTestOptions.forReleaseWithPreview("17"));
+ runNegativeTest(testFiles, expectedCompilerLog, null);
}
protected void runWarningTest(String[] testFiles, String expectedCompilerLog) {
runWarningTest(testFiles, expectedCompilerLog, null);
@@ -90,9 +88,6 @@
runner.testFiles = testFiles;
runner.expectedCompilerLog = expectedCompilerLog;
runner.customOptions = customOptions;
- runner.vmArguments = new String[] {"--enable-preview"};
- runner.javacTestOptions = javacAdditionalTestOptions == null ? JavacTestOptions.forReleaseWithPreview("17") :
- JavacTestOptions.forReleaseWithPreview("17", javacAdditionalTestOptions);
runner.runWarningTest();
}
@@ -993,6 +988,7 @@
"----------\n"
);
}
+
public void testBug568514LocalEnums_004() {
this.runNegativeTest(
new String[] {
@@ -1005,12 +1001,7 @@
"}\n",
},
"----------\n" +
- "1. WARNING in X.java (at line 3)\n" +
- " public strictfp enum I {}\n" +
- " ^^^^^^^^\n" +
- "Floating-point expressions are always strictly evaluated from source level 17. Keyword \'strictfp\' is not required.\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 4)\n" +
+ "1. ERROR in X.java (at line 4)\n" +
" Zork;\n" +
" ^^^^\n" +
"Syntax error, insert \"VariableDeclarators\" to complete LocalVariableDeclaration\n" +