From 91912aae419cdde96159aaa11a6d8f04ff881ba0 Mon Sep 17 00:00:00 2001 From: Srikanth Sankaran Date: Mon, 13 Nov 2023 20:16:46 +0530 Subject: [PATCH] Adjust test expectations --- .../InstanceofPrimaryPatternTest.java | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InstanceofPrimaryPatternTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InstanceofPrimaryPatternTest.java index 18e41e9574e..0cc98c3f720 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InstanceofPrimaryPatternTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InstanceofPrimaryPatternTest.java @@ -109,8 +109,13 @@ public void test002() { "----------\n" + "1. ERROR in X.java (at line 3)\n" + " if (obj instanceof (String s)) {\n" + - " ^^^^^^^^^^\n" + - "Syntax error on token \"instanceof\", ReferenceType expected after this token\n" + + " ^\n" + + "Syntax error on token \"(\", delete this token\n" + + "----------\n" + + "2. ERROR in X.java (at line 3)\n" + + " if (obj instanceof (String s)) {\n" + + " ^\n" + + "Syntax error on token \")\", delete this token\n" + "----------\n"); } public void test003() { @@ -131,13 +136,28 @@ public void test003() { "----------\n" + "1. ERROR in X.java (at line 3)\n" + " if (obj instanceof ((String s))) {\n" + - " ^\n" + - "Syntax error on token \"(\", invalid ReferenceType\n" + + " ^^^^^^^^^^\n" + + "Syntax error, insert \"Type\" to complete InstanceofClassic\n" + "----------\n" + "2. ERROR in X.java (at line 3)\n" + " if (obj instanceof ((String s))) {\n" + + " ^^^^^^^^^^\n" + + "Syntax error, insert \") Statement\" to complete BlockStatements\n" + + "----------\n" + + "3. ERROR in X.java (at line 3)\n" + + " if (obj instanceof ((String s))) {\n" + + " ^^^^^^\n" + + "Syntax error on token \"String\", ( expected after this token\n" + + "----------\n" + + "4. ERROR in X.java (at line 3)\n" + + " if (obj instanceof ((String s))) {\n" + " ^\n" + - "Syntax error on token \")\", delete this token\n" + + "Syntax error, insert \"AssignmentOperator Expression\" to complete Assignment\n" + + "----------\n" + + "5. ERROR in X.java (at line 3)\n" + + " if (obj instanceof ((String s))) {\n" + + " ^\n" + + "Syntax error, insert \";\" to complete Statement\n" + "----------\n"); } public void test007() {