### 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.33 diff -u -r1.33 BatchCompilerTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 16 Jan 2006 13:59:15 -0000 1.33 +++ src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 18 Jan 2006 17:31:44 -0000 @@ -482,7 +482,8 @@ if (normalize == null) return false; // return keep.equals(normalizer.normalized(normalize)); - return equals(keep, normalizer.normalized(normalize)); + return equals(keep, + normalizer.normalized(normalize)); } private static boolean equals(String a, String b) { StringBuffer aBuffer = new StringBuffer(a), bBuffer = new StringBuffer(b); @@ -618,7 +619,7 @@ result); } // test the tester - runConformTest -public void _test007(){ +public void test007(){ this.runConformTest( new String[] { "X.java", @@ -642,9 +643,18 @@ + " -cp " + JRE_HOME_DIR + "/lib/jce.jar" + " -verbose -warn:+deprecation,syntheticAccess,uselessTypeCheck,unsafe,finalBound,unusedLocal" + " -proceedOnError -referenceInfo -d \"" + OUTPUT_DIR + "\"", - "[1 .class file generated]\n", + "[parsing ---OUTPUT_DIR_PLACEHOLDER---/X.java - #1/1]\n" + + "[reading java/lang/Object.class]\n" + + "[analyzing ---OUTPUT_DIR_PLACEHOLDER---/X.java - #1/1]\n" + + "[reading java/util/List.class]\n" + + "[reading java/lang/SuppressWarnings.class]\n" + + "[reading java/lang/String.class]\n" + + "[writing X.class - #1]\n" + + "[completed ---OUTPUT_DIR_PLACEHOLDER---/X.java - #1/1]\n" + + "[1 unit compiled]\n" + + "[1 .class file generated]\n", "----------\n" + - "1. WARNING in ---OUTPUT_DIR_PLACEHOLDER---" + File.separator + "X.java\n" + + "1. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/X.java\n" + " (at line 1)\n" + " import java.util.List;\n" + " ^^^^^^^^^^^^^^\n" + @@ -653,7 +663,7 @@ "1 problem (1 warning)", true); } // test the tester - runNegativeTest -public void _test008(){ +public void test008(){ this.runNegativeTest( new String[] { "X.java", @@ -677,19 +687,29 @@ + " -cp " + JRE_HOME_DIR + "/lib/jce.jar" + " -verbose -warn:+deprecation,syntheticAccess,uselessTypeCheck,unsafe,finalBound,unusedLocal" + " -proceedOnError -referenceInfo -d \"" + OUTPUT_DIR + "\"", - "[1 .class file generated]\n", - "----------\n" + - "1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---" + File.separator + "X.java\n" + - " (at line 11)\n" + - " Zork z;\n" + - " ^^^^\n" + - "Zork cannot be resolved to a type\n" + - "----------\n" + - "1 problem (1 error)", true); + "[parsing ---OUTPUT_DIR_PLACEHOLDER---/X.java - #1/1]\n" + + "[reading java/lang/Object.class]\n" + + "[analyzing ---OUTPUT_DIR_PLACEHOLDER---/X.java - #1/1]\n" + + "[reading java/util/List.class]\n" + + "[reading java/lang/SuppressWarnings.class]\n" + + "[reading java/lang/String.class]\n" + + "[writing X.class - #1]\n" + + "[completed ---OUTPUT_DIR_PLACEHOLDER---/X.java - #1/1]\n" + + "[1 unit compiled]\n" + + "[1 .class file generated]\n", + "----------\n" + + "1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/X.java\n" + + " (at line 11)\n" + + " Zork z;\n" + + " ^^^^\n" + + "Zork cannot be resolved to a type\n" + + "----------\n" + + "1 problem (1 error)", + true); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=92398 -- a case that works, another that does not // revisit this test case depending on https://bugs.eclipse.org/bugs/show_bug.cgi?id=95349 -public void _test009(){ +public void test009(){ this.runNegativeTest( new String[] { "X.java", @@ -726,35 +746,33 @@ + " -1.5 -g -preserveAllLocals" + " -cp \"" + OUTPUT_DIR + "[+OK2" + File.pathSeparator + "~Warn" + File.pathSeparator + "-KO]\"" - + " -verbose -warn:+deprecation,syntheticAccess,uselessTypeCheck,unsafe,finalBound,unusedLocal" + + " -warn:+deprecation,syntheticAccess,uselessTypeCheck,unsafe,finalBound,unusedLocal" + " -proceedOnError -referenceInfo -d \"" + OUTPUT_DIR + "\"", - "[5 .class files generated]\n", - "----------\n" + - "1. WARNING in ---OUTPUT_DIR_PLACEHOLDER---" + File.separator + "X.java\n" + - " (at line 5)\n" + - " Warn warn;\n" + - " ^^^^\n" + - "Discouraged access: Warn\n" + - "----------\n" + - "----------\n" + - "2. WARNING in ---OUTPUT_DIR_PLACEHOLDER---" + File.separator + "X.java\n" + - " (at line 6)\n" + - " KO ko;\n" + - " ^^\n" + - "Access restriction: KO\n" + - "----------\n" + - "----------\n" + - "3. ERROR in ---OUTPUT_DIR_PLACEHOLDER---" + File.separator + "X.java\n" + - " (at line 7)\n" + - " Zork z;\n" + - " ^^^^\n" + - "Zork cannot be resolved to a type\n" + - "----------\n" + - "3 problems (1 error, 2 warnings)", + "", + "----------\n" + + "1. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/X.java\n" + + " (at line 5)\n" + + " Warn warn;\n" + + " ^^^^\n" + + "Discouraged access: Warn\n" + + "----------\n" + + "2. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/X.java\n" + + " (at line 6)\n" + + " KO ko;\n" + + " ^^\n" + + "Access restriction: KO\n" + + "----------\n" + + "3. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/X.java\n" + + " (at line 7)\n" + + " Zork z;\n" + + " ^^^^\n" + + "Zork cannot be resolved to a type\n" + + "----------\n" + + "3 problems (1 error, 2 warnings)", true); } // command line - no user classpath nor bootclasspath -public void _test010(){ +public void test010(){ this.runConformTest( new String[] { "X.java", @@ -774,11 +792,11 @@ }, "\"" + OUTPUT_DIR + File.separator + "X.java\"" + " -1.5 -g -preserveAllLocals" - + " -verbose -warn:+deprecation,syntheticAccess,uselessTypeCheck,unsafe,finalBound,unusedLocal" + + " -warn:+deprecation,syntheticAccess,uselessTypeCheck,unsafe,finalBound,unusedLocal" + " -proceedOnError -referenceInfo -d \"" + OUTPUT_DIR + "\"", - "[1 .class file generated]\n", + "", "----------\n" + - "1. WARNING in ---OUTPUT_DIR_PLACEHOLDER---" + File.separator + "X.java\n" + + "1. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/X.java\n" + " (at line 1)\n" + " import java.util.List;\n" + " ^^^^^^^^^^^^^^\n" + @@ -805,128 +823,140 @@ true); } // command line - help -public void _test012(){ +public void test012(){ final String expectedOutput = "{0}\n" + - " \n" + - " Usage: \n" + - " If directories are specified, then their source contents are compiled.\n" + - " Possible options are listed below. Options enabled by default are prefixed with \'\'+\'\'\n" + - " \n" + - " Classpath options:\n" + - " -cp -classpath \n" + - " specify location for application classes and sources. Each\n" + - " directory or file can specify access rules for types between\n" + - " \'\'[\'\' and \'\']\'\' (e.g. [-X.java] to deny access to type X)\n" + - " -bootclasspath \n" + - " specify location for system classes. Each directory or file can\n" + - " specify access rules for types between \'\'[\'\' and \'\']\'\' (e.g. [-X.java]\n" + - " to deny access to type X)\n" + - " -sourcepath \n" + - " specify location for application sources. Each directory or file can\n" + - " specify access rules for types between \'\'[\'\' and \'\']\'\' (e.g. [-X.java]\n" + - " to deny access to type X)\n" + - " -extdirs \n" + - " specify location for extension zip/jar files\n" + - " -d destination directory (if omitted, no directory is created)\n" + - " -d none generate no .class files\n" + - " -encoding specify custom encoding for all sources. Each file/directory can override it\n" + - " when suffixed with \'\'[\'\'\'\']\'\' (e.g. X.java[utf8])\n" + - " \n" + - " Compliance options:\n" + - " -1.3 use 1.3 compliance level (implicit -source 1.3 -target 1.1)\n" + - " -1.4 + use 1.4 compliance level (implicit -source 1.3 -target 1.2)\n" + - " -1.5 use 1.5 compliance level (implicit -source 1.5 -target 1.5)\n" + - " -source set source level: 1.3 to 1.5 (or 5 or 5.0)\n" + - " -target set classfile target level: 1.1 to 1.5 (or 5 or 5.0)\n" + - " \n" + - " Warning options:\n" + - " -deprecation + deprecation outside deprecated code\n" + - " -nowarn disable all warnings\n" + - " -warn:none disable all warnings\n" + - " -warn: enable exactly the listed warnings\n" + - " -warn:+ enable additional warnings\n" + - " -warn:- disable specific warnings\n" + - " allDeprecation deprecation including inside deprecated code\n" + - " allJavadoc invalid or missing javadoc\n" + - " assertIdentifier + \'\'assert\'\' used as identifier\n" + - " boxing autoboxing conversion\n" + - " charConcat + char[] in String concat\n" + - " conditionAssign possible accidental boolean assignment\n" + - " constructorName + method with constructor name\n" + - " dep-ann missing @Deprecated annotation\n" + - " deprecation + deprecation outside deprecated code\n" + - " emptyBlock undocumented empty block\n" + - " enumSwitch incomplete enum switch\n" + - " fieldHiding field hiding another variable\n" + - " finalBound type parameter with final bound\n" + - " finally + finally block not completing normally\n" + - " indirectStatic indirect reference to static member\n" + - " intfAnnotation + annotation type used as super interface\n" + - " intfNonInherited + interface non-inherited method compatibility\n" + - " javadoc invalid javadoc\n" + - " localHiding local variable hiding another variable\n" + - " maskedCatchBlock + hidden catch block\n" + - " nls string literal lacking non-nls tag //$NON-NLS-$\n" + - " noEffectAssign + assignment without effect\n" + - " null missing or redundant null check\n" + - " over-ann missing @Override annotation\n" + - " pkgDefaultMethod + attempt to override package-default method\n" + - " semicolon unnecessary semicolon, empty statement\n" + - " serial + missing serialVersionUID\n" + - " suppress + enable @SuppressWarnings\n" + - " unqualifiedField unqualified reference to field\n" + - " unchecked + unchecked type operation\n" + - " unusedArgument unread method parameter\n" + - " unusedImport + unused import declaration\n" + - " unusedLocal unread local variable\n" + - " unusedPrivate unused private member declaration\n" + - " unusedThrown unused declared thrown exception\n" + - " unnecessaryElse unnecessary else clause\n" + - " uselessTypeCheck unnecessary cast/instanceof operation\n" + - " specialParamHiding constructor or setter parameter hiding another field\n" + - " staticReceiver + non-static reference to static member\n" + - " syntheticAccess synthetic access for innerclass\n" + - " tasks() tasks identified by tags inside comments\n" + - " typeHiding + type parameter hiding another type\n" + - " varargsCast + varargs argument need explicit cast\n" + - " warningToken + unhandled warning token in @SuppressWarnings\n" + - " \n" + - " Debug options:\n" + - " -g[:lines,vars,source] custom debug info\n" + - " -g:lines,source + both lines table and source debug info\n" + - " -g all debug info\n" + - " -g:none no debug info\n" + - " -preserveAllLocals preserve unused local vars for debug purpose\n" + - " \n" + - " Ignored options:\n" + - " -J