Lines 9-14
Link Here
|
9 |
* IBM Corporation - initial API and implementation |
9 |
* IBM Corporation - initial API and implementation |
10 |
* Benjamin Muskalla - Contribution for bug 239066 |
10 |
* Benjamin Muskalla - Contribution for bug 239066 |
11 |
* Stephan Herrmann - Contribution for bug 236385 |
11 |
* Stephan Herrmann - Contribution for bug 236385 |
|
|
12 |
* Stephan Herrmann - Contribution for bug 295551 |
12 |
*******************************************************************************/ |
13 |
*******************************************************************************/ |
13 |
package org.eclipse.jdt.core.tests.compiler.regression; |
14 |
package org.eclipse.jdt.core.tests.compiler.regression; |
14 |
|
15 |
|
Lines 47-54
Link Here
|
47 |
|
48 |
|
48 |
static { |
49 |
static { |
49 |
// TESTS_NAMES = new String[] { "test292_warn_options" }; |
50 |
// TESTS_NAMES = new String[] { "test292_warn_options" }; |
50 |
// TESTS_NUMBERS = new int[] { 295 }; |
51 |
// TESTS_NUMBERS = new int[] { 298 }; |
51 |
// TESTS_RANGE = new int[] { 107, -1 }; |
52 |
// TESTS_RANGE = new int[] { 298, -1 }; |
52 |
} |
53 |
} |
53 |
public BatchCompilerTest(String name) { |
54 |
public BatchCompilerTest(String name) { |
54 |
super(name); |
55 |
super(name); |
Lines 1696-1702
Link Here
|
1696 |
" static-access macro for indirectStatic and staticReceiver\n" + |
1697 |
" static-access macro for indirectStatic and staticReceiver\n" + |
1697 |
" staticReceiver + non-static reference to static member\n" + |
1698 |
" staticReceiver + non-static reference to static member\n" + |
1698 |
" super overriding a method without making a super invocation\n" + |
1699 |
" super overriding a method without making a super invocation\n" + |
1699 |
" suppress + enable @SuppressWarnings\n" + |
1700 |
" suppress + enable @SuppressWarnings\n" + |
|
|
1701 |
" When used with -err:, it can also silent optional\n" + |
1702 |
" errors and warnings\n" + |
1700 |
" syncOverride missing synchronized in synchr. method override\n" + |
1703 |
" syncOverride missing synchronized in synchr. method override\n" + |
1701 |
" syntheticAccess synthetic access for innerclass\n" + |
1704 |
" syntheticAccess synthetic access for innerclass\n" + |
1702 |
" tasks(<tags separated by |>) tasks identified by tags inside comments\n" + |
1705 |
" tasks(<tags separated by |>) tasks identified by tags inside comments\n" + |
Lines 1843-1848
Link Here
|
1843 |
" <option key=\"org.eclipse.jdt.core.compiler.problem.redundantSuperinterface\" value=\"ignore\"/>\n" + |
1846 |
" <option key=\"org.eclipse.jdt.core.compiler.problem.redundantSuperinterface\" value=\"ignore\"/>\n" + |
1844 |
" <option key=\"org.eclipse.jdt.core.compiler.problem.specialParameterHidingField\" value=\"disabled\"/>\n" + |
1847 |
" <option key=\"org.eclipse.jdt.core.compiler.problem.specialParameterHidingField\" value=\"disabled\"/>\n" + |
1845 |
" <option key=\"org.eclipse.jdt.core.compiler.problem.staticAccessReceiver\" value=\"warning\"/>\n" + |
1848 |
" <option key=\"org.eclipse.jdt.core.compiler.problem.staticAccessReceiver\" value=\"warning\"/>\n" + |
|
|
1849 |
" <option key=\"org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors\" value=\"disabled\"/>\n" + |
1846 |
" <option key=\"org.eclipse.jdt.core.compiler.problem.suppressWarnings\" value=\"enabled\"/>\n" + |
1850 |
" <option key=\"org.eclipse.jdt.core.compiler.problem.suppressWarnings\" value=\"enabled\"/>\n" + |
1847 |
" <option key=\"org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation\" value=\"ignore\"/>\n" + |
1851 |
" <option key=\"org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation\" value=\"ignore\"/>\n" + |
1848 |
" <option key=\"org.eclipse.jdt.core.compiler.problem.tasks\" value=\"warning\"/>\n" + |
1852 |
" <option key=\"org.eclipse.jdt.core.compiler.problem.tasks\" value=\"warning\"/>\n" + |
Lines 11210-11213
Link Here
|
11210 |
"invalid error configuration: \'-err\'\n", |
11214 |
"invalid error configuration: \'-err\'\n", |
11211 |
true); |
11215 |
true); |
11212 |
} |
11216 |
} |
|
|
11217 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=295551 |
11218 |
public void test298(){ |
11219 |
this.runConformTest( |
11220 |
new String[] { |
11221 |
"X.java", |
11222 |
"public class X {\n" + |
11223 |
" @SuppressWarnings(\"unused\")\n" + |
11224 |
" private int i;\n" + |
11225 |
"}", |
11226 |
}, |
11227 |
"\"" + OUTPUT_DIR + File.separator + "X.java\"" |
11228 |
+ " -1.5 -g -preserveAllLocals" |
11229 |
+ " -proceedOnError -err:+unused,suppress -d \"" + OUTPUT_DIR + "\"", |
11230 |
"", |
11231 |
"", |
11232 |
true); |
11233 |
} |
11234 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=295551 |
11235 |
public void test299(){ |
11236 |
this.runNegativeTest( |
11237 |
new String[] { |
11238 |
"X.java", |
11239 |
"public class X {\n" + |
11240 |
" @SuppressWarnings(\"unused\")\n" + |
11241 |
" private int i;\n" + |
11242 |
"}", |
11243 |
}, |
11244 |
"\"" + OUTPUT_DIR + File.separator + "X.java\"" |
11245 |
+ " -1.5 -g -preserveAllLocals" |
11246 |
+ " -proceedOnError -err:+unused -d \"" + OUTPUT_DIR + "\"", |
11247 |
"", |
11248 |
"----------\n" + |
11249 |
"1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 3)\n" + |
11250 |
" private int i;\n" + |
11251 |
" ^\n" + |
11252 |
"The field X.i is never read locally\n" + |
11253 |
"----------\n" + |
11254 |
"1 problem (1 error)", |
11255 |
true); |
11256 |
} |
11257 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=295551 |
11258 |
public void test300(){ |
11259 |
this.runConformTest( |
11260 |
new String[] { |
11261 |
"X.java", |
11262 |
"public class X {\n" + |
11263 |
" @SuppressWarnings(\"unused\")\n" + |
11264 |
" private int i;\n" + |
11265 |
"}", |
11266 |
}, |
11267 |
"\"" + OUTPUT_DIR + File.separator + "X.java\"" |
11268 |
+ " -1.5 -g -preserveAllLocals" |
11269 |
+ " -proceedOnError -warn:-suppress -err:+suppress,unused -d \"" + OUTPUT_DIR + "\"", |
11270 |
"", |
11271 |
"", |
11272 |
true); |
11273 |
} |
11274 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=295551 |
11275 |
public void test301(){ |
11276 |
this.runNegativeTest( |
11277 |
new String[] { |
11278 |
"X.java", |
11279 |
"public class X {\n" + |
11280 |
" @SuppressWarnings(\"unused\")\n" + |
11281 |
" private int i;\n" + |
11282 |
"}", |
11283 |
}, |
11284 |
"\"" + OUTPUT_DIR + File.separator + "X.java\"" |
11285 |
+ " -1.5 -g -preserveAllLocals" |
11286 |
+ " -proceedOnError -warn:-suppress -err:+unused -d \"" + OUTPUT_DIR + "\"", |
11287 |
"", |
11288 |
"----------\n" + |
11289 |
"1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 3)\n" + |
11290 |
" private int i;\n" + |
11291 |
" ^\n" + |
11292 |
"The field X.i is never read locally\n" + |
11293 |
"----------\n" + |
11294 |
"1 problem (1 error)", |
11295 |
true); |
11296 |
} |
11297 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=295551 |
11298 |
public void test302(){ |
11299 |
this.runNegativeTest( |
11300 |
new String[] { |
11301 |
"X.java", |
11302 |
"public class X {\n" + |
11303 |
" @SuppressWarnings(\"unused\")\n" + |
11304 |
" private int i;\n" + |
11305 |
"}", |
11306 |
}, |
11307 |
"\"" + OUTPUT_DIR + File.separator + "X.java\"" |
11308 |
+ " -1.5 -g -preserveAllLocals" |
11309 |
+ " -proceedOnError -warn:-suppress -err:+suppress,unused -warn:-suppress -d \"" + OUTPUT_DIR + "\"", |
11310 |
"", |
11311 |
"----------\n" + |
11312 |
"1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 3)\n" + |
11313 |
" private int i;\n" + |
11314 |
" ^\n" + |
11315 |
"The field X.i is never read locally\n" + |
11316 |
"----------\n" + |
11317 |
"1 problem (1 error)", |
11318 |
true); |
11319 |
} |
11320 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=295551 |
11321 |
public void test303(){ |
11322 |
this.runNegativeTest( |
11323 |
new String[] { |
11324 |
"X.java", |
11325 |
"public class X {\n" + |
11326 |
" @SuppressWarnings(\"unused\")\n" + |
11327 |
" private int i;\n" + |
11328 |
"}", |
11329 |
}, |
11330 |
"\"" + OUTPUT_DIR + File.separator + "X.java\"" |
11331 |
+ " -1.5 -g -preserveAllLocals" |
11332 |
+ " -proceedOnError -warn:-suppress -err:+suppress,unused -warn:+suppress -d \"" + OUTPUT_DIR + "\"", |
11333 |
"", |
11334 |
"----------\n" + |
11335 |
"1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 3)\n" + |
11336 |
" private int i;\n" + |
11337 |
" ^\n" + |
11338 |
"The field X.i is never read locally\n" + |
11339 |
"----------\n" + |
11340 |
"1 problem (1 error)", |
11341 |
true); |
11342 |
} |
11343 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=295551 |
11344 |
public void test304(){ |
11345 |
this.runNegativeTest( |
11346 |
new String[] { |
11347 |
"X.java", |
11348 |
"public class X {\n" + |
11349 |
" @SuppressWarnings(\"unused\")\n" + |
11350 |
" private int i;\n" + |
11351 |
"}", |
11352 |
}, |
11353 |
"\"" + OUTPUT_DIR + File.separator + "X.java\"" |
11354 |
+ " -1.5 -g -preserveAllLocals" |
11355 |
+ " -proceedOnError -err:+suppress,unused -warn:-suppress -d \"" + OUTPUT_DIR + "\"", |
11356 |
"", |
11357 |
"----------\n" + |
11358 |
"1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 3)\n" + |
11359 |
" private int i;\n" + |
11360 |
" ^\n" + |
11361 |
"The field X.i is never read locally\n" + |
11362 |
"----------\n" + |
11363 |
"1 problem (1 error)", |
11364 |
true); |
11365 |
} |
11213 |
} |
11366 |
} |