Lines 45-51
Link Here
|
45 |
// All specified tests which do not belong to the class are skipped... |
45 |
// All specified tests which do not belong to the class are skipped... |
46 |
static { |
46 |
static { |
47 |
// TESTS_NAMES = new String[] { "test127" }; |
47 |
// TESTS_NAMES = new String[] { "test127" }; |
48 |
// TESTS_NUMBERS = new int[] { 289 }; |
48 |
// TESTS_NUMBERS = new int[] { 290, 291 }; |
49 |
// TESTS_RANGE = new int[] { 249, -1 }; |
49 |
// TESTS_RANGE = new int[] { 249, -1 }; |
50 |
} |
50 |
} |
51 |
|
51 |
|
Lines 9606-9609
Link Here
|
9606 |
options, |
9606 |
options, |
9607 |
null); |
9607 |
null); |
9608 |
} |
9608 |
} |
|
|
9609 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=313109 |
9610 |
public void test290() { |
9611 |
Map options = getCompilerOptions(); |
9612 |
options.put(CompilerOptions.OPTION_ReportUncheckedTypeOperation, CompilerOptions.ERROR); |
9613 |
options.put(CompilerOptions.OPTION_ReportRawTypeReference, CompilerOptions.ERROR); |
9614 |
options.put(CompilerOptions.OPTION_SuppressOptionalErrors, CompilerOptions.ENABLED); |
9615 |
options.put(CompilerOptions.OPTION_ReportUnusedWarningToken, CompilerOptions.ERROR); |
9616 |
this.runConformTest( |
9617 |
new String[] { |
9618 |
"X.java", |
9619 |
"import java.util.ArrayList;\n" + |
9620 |
"class X {\n" + |
9621 |
" @SuppressWarnings(\"rawtypes\")\n" + |
9622 |
" void foo(ArrayList arg) {\n" + |
9623 |
" @SuppressWarnings(\"unchecked\")\n" + |
9624 |
" boolean aa = arg.add(1), bb = arg.add(1);\n" + |
9625 |
" if (bb)\n" + |
9626 |
" System.out.println(\"hi\");\n" + |
9627 |
" }\n" + |
9628 |
"}" |
9629 |
}, |
9630 |
"", |
9631 |
null, |
9632 |
true, |
9633 |
null, |
9634 |
options, |
9635 |
null); |
9636 |
} |
9637 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=313109 |
9638 |
public void test291() { |
9639 |
Map options = getCompilerOptions(); |
9640 |
options.put(CompilerOptions.OPTION_ReportUncheckedTypeOperation, CompilerOptions.ERROR); |
9641 |
options.put(CompilerOptions.OPTION_ReportRawTypeReference, CompilerOptions.ERROR); |
9642 |
options.put(CompilerOptions.OPTION_SuppressOptionalErrors, CompilerOptions.ENABLED); |
9643 |
options.put(CompilerOptions.OPTION_ReportUnusedWarningToken, CompilerOptions.ERROR); |
9644 |
this.runConformTest( |
9645 |
new String[] { |
9646 |
"X.java", |
9647 |
"import java.util.ArrayList;\n" + |
9648 |
"class X {\n" + |
9649 |
" @SuppressWarnings(\"rawtypes\")\n" + |
9650 |
" void foo(ArrayList arg) {\n" + |
9651 |
" @SuppressWarnings(\"unchecked\")\n" + |
9652 |
" boolean aa = arg.add(1), bb = arg.add(1);\n" + |
9653 |
" if (aa)\n" + |
9654 |
" System.out.println(\"hi\");\n" + |
9655 |
" }\n" + |
9656 |
"}" |
9657 |
}, |
9658 |
"", |
9659 |
null, |
9660 |
true, |
9661 |
null, |
9662 |
options, |
9663 |
null); |
9664 |
} |
9665 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=313109 |
9666 |
public void test292() { |
9667 |
Map options = getCompilerOptions(); |
9668 |
options.put(CompilerOptions.OPTION_ReportUncheckedTypeOperation, CompilerOptions.ERROR); |
9669 |
options.put(CompilerOptions.OPTION_ReportRawTypeReference, CompilerOptions.ERROR); |
9670 |
options.put(CompilerOptions.OPTION_SuppressOptionalErrors, CompilerOptions.ENABLED); |
9671 |
options.put(CompilerOptions.OPTION_ReportUnusedWarningToken, CompilerOptions.ERROR); |
9672 |
this.runConformTest( |
9673 |
new String[] { |
9674 |
"X.java", |
9675 |
"import java.util.ArrayList;\n" + |
9676 |
"class X {\n" + |
9677 |
" @SuppressWarnings(\"rawtypes\")\n" + |
9678 |
" void foo(ArrayList arg) {\n" + |
9679 |
" @SuppressWarnings(\"unchecked\")\n" + |
9680 |
" boolean aa = arg.add(1), bb = arg.add(1);\n" + |
9681 |
" }\n" + |
9682 |
"}" |
9683 |
}, |
9684 |
"", |
9685 |
null, |
9686 |
true, |
9687 |
null, |
9688 |
options, |
9689 |
null); |
9690 |
} |
9609 |
} |
9691 |
} |