--- old/test/langtools/tools/javac/expswitch/ExpSwitchNestingTest.java 2018-12-11 11:16:46.520770999 -0800 +++ new/test/langtools/tools/javac/expswitch/ExpSwitchNestingTest.java 2018-12-11 11:16:46.348685000 -0800 @@ -75,6 +75,8 @@ } } + private static String[] PREVIEW_OPTIONS = {"--enable-preview", "-source", "13"}; + private void program(String... constructs) { String s = "class C { static boolean cond = false; static int x = 0; void m() { # } }"; for (String c : constructs) @@ -84,7 +86,7 @@ private void assertOK(String... constructs) { reset(); - addCompileOptions("--enable-preview", "-source", "12"); + addCompileOptions(PREVIEW_OPTIONS); program(constructs); try { compile(); @@ -97,7 +99,7 @@ private void assertOKWithWarning(String warning, String... constructs) { reset(); - addCompileOptions("--enable-preview", "-source", "12"); + addCompileOptions(PREVIEW_OPTIONS); program(constructs); try { compile(); @@ -110,7 +112,7 @@ private void assertFail(String expectedDiag, String... constructs) { reset(); - addCompileOptions("--enable-preview", "-source", "12"); + addCompileOptions(PREVIEW_OPTIONS); program(constructs); try { compile();