Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2010-05-27 19:14:20 +0000
committerStephan Herrmann2010-05-27 19:14:20 +0000
commitc090afaecd3844e5af2a6e53a1e8bfa44e7e6899 (patch)
treef020241ab9626bde26c4722c1534e6c6a5bee0e3
parentdb48bf6444f7f052612c126c8c89161581d03ed1 (diff)
downloadorg.eclipse.objectteams-c090afaecd3844e5af2a6e53a1e8bfa44e7e6899.tar.gz
org.eclipse.objectteams-c090afaecd3844e5af2a6e53a1e8bfa44e7e6899.tar.xz
org.eclipse.objectteams-c090afaecd3844e5af2a6e53a1e8bfa44e7e6899.zip
updating jdt.core tests to v_A54 for 3.6 RC2
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java84
1 files changed, 83 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java
index 17c799e36..44a135a1e 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java
@@ -45,7 +45,7 @@ public class AnnotationTest extends AbstractComparableTest {
// All specified tests which do not belong to the class are skipped...
static {
// TESTS_NAMES = new String[] { "test127" };
-// TESTS_NUMBERS = new int[] { 289 };
+// TESTS_NUMBERS = new int[] { 290, 291 };
// TESTS_RANGE = new int[] { 249, -1 };
}
@@ -9606,4 +9606,86 @@ public void test289() {
options,
null);
}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=313109
+public void test290() {
+ Map options = getCompilerOptions();
+ options.put(CompilerOptions.OPTION_ReportUncheckedTypeOperation, CompilerOptions.ERROR);
+ options.put(CompilerOptions.OPTION_ReportRawTypeReference, CompilerOptions.ERROR);
+ options.put(CompilerOptions.OPTION_SuppressOptionalErrors, CompilerOptions.ENABLED);
+ options.put(CompilerOptions.OPTION_ReportUnusedWarningToken, CompilerOptions.ERROR);
+ this.runConformTest(
+ new String[] {
+ "X.java",
+ "import java.util.ArrayList;\n" +
+ "class X {\n" +
+ " @SuppressWarnings(\"rawtypes\")\n" +
+ " void foo(ArrayList arg) {\n" +
+ " @SuppressWarnings(\"unchecked\")\n" +
+ " boolean aa = arg.add(1), bb = arg.add(1);\n" +
+ " if (bb)\n" +
+ " System.out.println(\"hi\");\n" +
+ " }\n" +
+ "}"
+ },
+ "",
+ null,
+ true,
+ null,
+ options,
+ null);
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=313109
+public void test291() {
+ Map options = getCompilerOptions();
+ options.put(CompilerOptions.OPTION_ReportUncheckedTypeOperation, CompilerOptions.ERROR);
+ options.put(CompilerOptions.OPTION_ReportRawTypeReference, CompilerOptions.ERROR);
+ options.put(CompilerOptions.OPTION_SuppressOptionalErrors, CompilerOptions.ENABLED);
+ options.put(CompilerOptions.OPTION_ReportUnusedWarningToken, CompilerOptions.ERROR);
+ this.runConformTest(
+ new String[] {
+ "X.java",
+ "import java.util.ArrayList;\n" +
+ "class X {\n" +
+ " @SuppressWarnings(\"rawtypes\")\n" +
+ " void foo(ArrayList arg) {\n" +
+ " @SuppressWarnings(\"unchecked\")\n" +
+ " boolean aa = arg.add(1), bb = arg.add(1);\n" +
+ " if (aa)\n" +
+ " System.out.println(\"hi\");\n" +
+ " }\n" +
+ "}"
+ },
+ "",
+ null,
+ true,
+ null,
+ options,
+ null);
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=313109
+public void test292() {
+ Map options = getCompilerOptions();
+ options.put(CompilerOptions.OPTION_ReportUncheckedTypeOperation, CompilerOptions.ERROR);
+ options.put(CompilerOptions.OPTION_ReportRawTypeReference, CompilerOptions.ERROR);
+ options.put(CompilerOptions.OPTION_SuppressOptionalErrors, CompilerOptions.ENABLED);
+ options.put(CompilerOptions.OPTION_ReportUnusedWarningToken, CompilerOptions.ERROR);
+ this.runConformTest(
+ new String[] {
+ "X.java",
+ "import java.util.ArrayList;\n" +
+ "class X {\n" +
+ " @SuppressWarnings(\"rawtypes\")\n" +
+ " void foo(ArrayList arg) {\n" +
+ " @SuppressWarnings(\"unchecked\")\n" +
+ " boolean aa = arg.add(1), bb = arg.add(1);\n" +
+ " }\n" +
+ "}"
+ },
+ "",
+ null,
+ true,
+ null,
+ options,
+ null);
+}
}

Back to the top