### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core.tests.compiler Index: src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java,v retrieving revision 1.140 diff -u -r1.140 BatchCompilerTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 30 Nov 2007 13:50:41 -0000 1.140 +++ src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 3 Jan 2008 07:18:47 -0000 @@ -5609,7 +5609,7 @@ } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=210518 // bad behavior for -warn:null -warn:unused -public void _test156_warn_options() { +public void test156_warn_options() { // same source as 153, skip default checks this.runConformTest( new String[] { @@ -7815,6 +7815,48 @@ "1 problem (1 warning)", true); } +// https://bugs.eclipse.org/bugs/show_bug.cgi?id=210518 +// variant +public void test214_warn_options() { + // same source as 153, skip default checks + this.runNegativeTest( + new String[] { + "X.java", + "public class X {\n" + + " public static void foo() {\n" + + " String s = null;\n" + + " s.toString();\n" + + " String u;\n" + + " }\n" + + "}", + }, + "\"" + OUTPUT_DIR + File.separator + "X.java\"" + + " -warn:null,-unused -proc:none -d \"" + OUTPUT_DIR + "\"", + "", + "invalid warning option: -warn:null,-unused. Must specify a warning token\n", + true); +} +// https://bugs.eclipse.org/bugs/show_bug.cgi?id=210518 +// variant +public void test215_warn_options() { + // same source as 153, skip default checks + this.runNegativeTest( + new String[] { + "X.java", + "public class X {\n" + + " public static void foo() {\n" + + " String s = null;\n" + + " s.toString();\n" + + " String u;\n" + + " }\n" + + "}", + }, + "\"" + OUTPUT_DIR + File.separator + "X.java\"" + + " -warn:null,+unused -proc:none -d \"" + OUTPUT_DIR + "\"", + "", + "invalid warning option: -warn:null,+unused. Must specify a warning token\n", + true); +} public static Class testClass() { return BatchCompilerTest.class; }