test/langtools/tools/javac/expswitch/ExpSwitchNestingTest.java
changeset 59021 cfc7bb9a5a92
parent 55306 ea43db53de91
--- a/test/langtools/tools/javac/expswitch/ExpSwitchNestingTest.java	Mon Nov 11 17:43:10 2019 -0800
+++ b/test/langtools/tools/javac/expswitch/ExpSwitchNestingTest.java	Tue Nov 12 06:32:13 2019 +0000
@@ -76,9 +76,6 @@
         }
     }
 
-    private static String[] PREVIEW_OPTIONS = {"--enable-preview", "-source",
-                                               Integer.toString(Runtime.version().feature())};
-
     private void program(String... constructs) {
         String s = "class C { static boolean cond = false; static int x = 0; void m() { # } }";
         for (String c : constructs)
@@ -88,7 +85,7 @@
 
     private void assertOK(String... constructs) {
         reset();
-        addCompileOptions(PREVIEW_OPTIONS);
+        addCompileOptions();
         program(constructs);
         try {
             compile();
@@ -101,7 +98,7 @@
 
     private void assertOKWithWarning(String warning, String... constructs) {
         reset();
-        addCompileOptions(PREVIEW_OPTIONS);
+        addCompileOptions();
         program(constructs);
         try {
             compile();
@@ -114,7 +111,7 @@
 
     private void assertFail(String expectedDiag, String... constructs) {
         reset();
-        addCompileOptions(PREVIEW_OPTIONS);
+        addCompileOptions();
         program(constructs);
         try {
             compile();