Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2019-02-10 09:16:56 +0000
committerStephan Herrmann2019-02-10 09:16:56 +0000
commit4985b541bd7e8505254dec2c663fef622ca5106e (patch)
tree4575e0764691cb5e73d5739bfbd187fe3f567b6d /org.eclipse.jdt.core.tests.compiler/src
parentd9746fbc57ac97ed6838da3dc1148ba0fb43fb84 (diff)
downloadeclipse.jdt.core-4985b541bd7e8505254dec2c663fef622ca5106e.tar.gz
eclipse.jdt.core-4985b541bd7e8505254dec2c663fef622ca5106e.tar.xz
eclipse.jdt.core-4985b541bd7e8505254dec2c663fef622ca5106e.zip
Bug 542562 - [12][test] test failures for Switch Expressions
- update ComplianceDiagnoseTest after fixing parser21.rsc - recognize OpenJ9 in AbstractJavaModelTests Change-Id: I4dc92f12e085862c462debb92ec58329b37b129d Signed-off-by: Stephan Herrmann <stephan.herrmann@berlin.de>
Diffstat (limited to 'org.eclipse.jdt.core.tests.compiler/src')
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java26
1 files changed, 18 insertions, 8 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java
index 458caf8039..13dadabc3c 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java
@@ -199,7 +199,7 @@ public void test0003() {
"1. ERROR in X.java (at line 1)\n" +
" public enum X {\n" +
" ^^^^\n" +
- "Syntax error on token \"enum\", module expected\n" +
+ "Syntax error on token \"enum\", interface expected\n" +
"----------\n";
String expected14ProblemLog =
expected13ProblemLog;
@@ -1241,7 +1241,7 @@ public void test0026() {
expected15ProblemLog
);
}
-public void _test0027() {
+public void test0027() {
String[] testFiles = new String[] {
"X.java",
"public class X {\n" +
@@ -1254,12 +1254,22 @@ public void _test0027() {
};
String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 3)\n" +
- " for(Object o : switch){\n" +
- " ^\n" +
- "Syntax error, insert \"; ; ) Statement\" to complete BlockStatements\n" +
- "----------\n";
+ "----------\n" +
+ "1. ERROR in X.java (at line 3)\n" +
+ " for(Object o : switch){\n" +
+ " ^\n" +
+ "Syntax error on token \":\", delete this token\n" +
+ "----------\n" +
+ "2. ERROR in X.java (at line 3)\n" +
+ " for(Object o : switch){\n" +
+ " ^\n" +
+ "Syntax error, insert \": Expression )\" to complete EnhancedForStatementHeader\n" + // FIXME: bogus suggestion, this rule is compliance 1.5
+ "----------\n" +
+ "3. ERROR in X.java (at line 3)\n" +
+ " for(Object o : switch){\n" +
+ " ^\n" +
+ "Syntax error, insert \"Statement\" to complete BlockStatements\n" +
+ "----------\n";
String expected14ProblemLog =
expected13ProblemLog;

Back to the top