Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8250840: some tests use --enable-preview unnecessarily
Reviewed-by: vromero
  • Loading branch information
lahodaj committed Sep 9, 2020
1 parent c655b70 commit c98417e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
Expand Up @@ -28,8 +28,8 @@
* @library /tools/lib ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
* @build toolbox.ToolBox javadoc.tester.*
* @compile --enable-preview --source ${jdk.version} TestRecordLinks.java
* @run main/othervm --enable-preview TestRecordLinks
* @compile TestRecordLinks.java
* @run main TestRecordLinks
*/

import java.nio.file.Path;
Expand Down
4 changes: 2 additions & 2 deletions test/langtools/jdk/jshell/ToolSimpleTest.java
Expand Up @@ -77,7 +77,7 @@ public void testOpenComment() {

@Test
public void testSwitchExpression() {
test(false, new String[]{"--enable-preview", "--no-startup"},
test(false, new String[]{"--no-startup"},
(a) -> assertCommand(a, "enum Day {MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY }", "| created enum Day"),
(a) -> assertCommand(a, "Day day = Day.FRIDAY;", "day ==> FRIDAY"),
(a) -> assertCommand(a, "switch (day) {", ""),
Expand All @@ -91,7 +91,7 @@ public void testSwitchExpression() {

@Test
public void testSwitchExpressionCompletion() {
test(false, new String[]{"--enable-preview", "--no-startup"},
test(false, new String[]{"--no-startup"},
(a) -> assertCommand(a, "enum Day {MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY }", "| created enum Day"),
(a) -> assertCommand(a, "Day day = Day.FRIDAY;", "day ==> FRIDAY"),
(a) -> assertCommand(a, "switch (day) {", ""),
Expand Down
Expand Up @@ -34,7 +34,7 @@
* jdk.compiler/com.sun.tools.javac.util
* @build toolbox.ToolBox toolbox.JavacTask
* @build combo.ComboTestHelper
* @compile --enable-preview -source ${jdk.version} ConditionalExpressionResolvePending.java
* @compile ConditionalExpressionResolvePending.java
* @run main/othervm --enable-preview ConditionalExpressionResolvePending
*/

Expand Down
4 changes: 2 additions & 2 deletions test/langtools/tools/javac/patterns/BreakAndLoops.java
Expand Up @@ -34,8 +34,8 @@
* jdk.compiler/com.sun.tools.javac.util
* @build toolbox.ToolBox toolbox.JavacTask
* @build combo.ComboTestHelper
* @compile --enable-preview -source ${jdk.version} BreakAndLoops.java
* @run main/othervm --enable-preview BreakAndLoops
* @compile BreakAndLoops.java
* @run main BreakAndLoops
*/

import combo.ComboInstance;
Expand Down
4 changes: 2 additions & 2 deletions test/langtools/tools/javac/patterns/ConditionalTest.java
Expand Up @@ -34,8 +34,8 @@
* jdk.compiler/com.sun.tools.javac.util
* @build toolbox.ToolBox toolbox.JavacTask
* @build combo.ComboTestHelper
* @compile --enable-preview -source ${jdk.version} ConditionalTest.java
* @run main/othervm --enable-preview ConditionalTest
* @compile ConditionalTest.java
* @run main ConditionalTest
*/

import combo.ComboInstance;
Expand Down
4 changes: 2 additions & 2 deletions test/langtools/tools/javac/recovery/ClassBlockExits.java
Expand Up @@ -32,8 +32,8 @@
* jdk.compiler/com.sun.tools.javac.util
* @build toolbox.ToolBox toolbox.JavacTask
* @build combo.ComboTestHelper
* @compile --enable-preview -source ${jdk.version} ClassBlockExits.java
* @run main/othervm --enable-preview ClassBlockExits
* @compile ClassBlockExits.java
* @run main ClassBlockExits
*/

import combo.ComboInstance;
Expand Down

1 comment on commit c98417e

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented on c98417e Sep 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Issues

Please sign in to comment.