diff options
author | Jay Arthanareeswaran | 2019-07-09 05:26:07 +0000 |
---|---|---|
committer | Jay Arthanareeswaran | 2019-07-09 05:26:07 +0000 |
commit | 2c6016ae14bdff2265ed063480a576ecf956527c (patch) | |
tree | 85459d7d9d30a994c19631d7c096b93631113957 | |
parent | 99d17734971ca767c4620674c044b3f2b146bd87 (diff) | |
download | eclipse.jdt.core-2c6016ae14bdff2265ed063480a576ecf956527c.tar.gz eclipse.jdt.core-2c6016ae14bdff2265ed063480a576ecf956527c.tar.xz eclipse.jdt.core-2c6016ae14bdff2265ed063480a576ecf956527c.zip |
Fixing tests that test preview features of Java 12 that are no longer
required. Adjusting the tests and output to run at compliance 13 only.
Change-Id: Ia7d2af0d5e262bebcb0a9aac88dc2aa383edc7e4
Signed-off-by: Jay Arthanareeswaran <jarthana@in.ibm.com>
-rw-r--r-- | org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ResourceLeakTests.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ResourceLeakTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ResourceLeakTests.java index 76b77b3bca..d79f1ee407 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ResourceLeakTests.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ResourceLeakTests.java @@ -5497,7 +5497,7 @@ public void testBug541705b() { runner.runConformTest(); } public void testBug542707_001() { - if (this.complianceLevel < ClassFileConstants.JDK12) return; // uses switch expression + if (this.complianceLevel < ClassFileConstants.JDK13) return; // uses switch expression Map options = getCompilerOptions(); options.put(JavaCore.COMPILER_PB_UNCLOSED_CLOSEABLE, CompilerOptions.ERROR); options.put(JavaCore.COMPILER_PB_POTENTIALLY_UNCLOSED_CLOSEABLE, CompilerOptions.ERROR); @@ -5517,7 +5517,7 @@ public void testBug542707_001() { " x = new X();\n"+ " x = switch (i) { \n"+ " case 1 -> {\n"+ - " break x;\n"+ + " yield x;\n"+ " }\n"+ " default -> x;\n"+ " };\n"+ @@ -5549,7 +5549,7 @@ public void testBug542707_001() { options); } public void testBug542707_002() { - if (this.complianceLevel < ClassFileConstants.JDK12) return; // uses switch expression + if (this.complianceLevel < ClassFileConstants.JDK13) return; // uses switch expression Map options = getCompilerOptions(); options.put(JavaCore.COMPILER_PB_UNCLOSED_CLOSEABLE, CompilerOptions.ERROR); options.put(JavaCore.COMPILER_PB_POTENTIALLY_UNCLOSED_CLOSEABLE, CompilerOptions.ERROR); @@ -5570,7 +5570,7 @@ public void testBug542707_002() { " x = switch (i) { \n"+ " case 1 -> {\n"+ " x = new X();\n"+ - " break x;\n"+ + " yield x;\n"+ " }\n"+ " default -> x;\n"+ " };\n"+ @@ -5607,7 +5607,7 @@ public void testBug542707_002() { options); } public void testBug542707_003() { - if (this.complianceLevel < ClassFileConstants.JDK12) return; // uses switch expression + if (this.complianceLevel < ClassFileConstants.JDK13) return; // uses switch expression Map options = getCompilerOptions(); options.put(JavaCore.COMPILER_PB_UNCLOSED_CLOSEABLE, CompilerOptions.ERROR); options.put(JavaCore.COMPILER_PB_POTENTIALLY_UNCLOSED_CLOSEABLE, CompilerOptions.ERROR); @@ -5627,7 +5627,7 @@ public void testBug542707_003() { " x = new X();\n"+ " x = switch (i) { \n"+ " case 1 -> {\n"+ - " break new X();\n"+ + " yield new X();\n"+ " }\n"+ " default -> x;\n"+ " };\n"+ @@ -5654,7 +5654,7 @@ public void testBug542707_003() { "1. ERROR in X.java (at line 10)\n" + " x = switch (i) { \n" + " case 1 -> {\n" + - " break new X();\n" + + " yield new X();\n" + " }\n" + " default -> x;\n" + " };\n" + |