Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarika Sinha2020-08-21 07:33:17 -0400
committerSarika Sinha2020-08-21 07:33:17 -0400
commit1af7ed636212551f9e571fd281bf99a212c5684e (patch)
tree401222f11b94e0314bba7c5ba961634535d4c462
parent9cd8f4ece021d58db4fdfa4aa4603ece71baf7f7 (diff)
downloadeclipse.jdt.core-1af7ed636212551f9e571fd281bf99a212c5684e.tar.gz
eclipse.jdt.core-1af7ed636212551f9e571fd281bf99a212c5684e.tar.xz
eclipse.jdt.core-1af7ed636212551f9e571fd281bf99a212c5684e.zip
Bug 564152 - [15] 2 Rewrite switch expression test case failing withY20200825-1200Y20200824-1310Y20200823-1200Y20200822-1200Y20200821-1200
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingSwitchExpressionsTest.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingSwitchExpressionsTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingSwitchExpressionsTest.java
index 268792e241..56cb0d810f 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingSwitchExpressionsTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingSwitchExpressionsTest.java
@@ -55,11 +55,14 @@ public class ASTRewritingSwitchExpressionsTest extends ASTRewritingTest {
return createSuite(ASTRewritingSwitchExpressionsTest.class);
}
- @SuppressWarnings("deprecation")
@Override
protected void setUp() throws Exception {
super.setUp();
- if (this.apiLevel == AST_INTERNAL_JLS14 ) {
+ if (this.apiLevel == AST_INTERNAL_JLS15 ) {
+ this.project1.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_15);
+ this.project1.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_15);
+ this.project1.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_15);
+ } else if (this.apiLevel == AST_INTERNAL_JLS14 ) {
this.project1.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_14);
this.project1.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_14);
this.project1.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_14);
@@ -230,9 +233,9 @@ public class ASTRewritingSwitchExpressionsTest extends ASTRewritingTest {
@SuppressWarnings("rawtypes")
public void testSwitchExpressions_03_since_12() throws Exception {
- if (this.apiLevel == AST_INTERNAL_JLS15) {
- return;
- }
+ /*
+ * if (this.apiLevel == AST_INTERNAL_JLS15) { return; }
+ */
IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
String s =
"package test1;\n"+
@@ -402,9 +405,9 @@ public class ASTRewritingSwitchExpressionsTest extends ASTRewritingTest {
}
@SuppressWarnings("rawtypes")
public void testSwitchExpressions_04_since_12() throws Exception {
- if (this.apiLevel == AST_INTERNAL_JLS15) {
- return;
- }
+ /*
+ * if (this.apiLevel == AST_INTERNAL_JLS15) { return; }
+ */
IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
String s = "package test1;\n"+
"public class X {\n"+

Back to the top