precise form of syntax error depends on enablement of keyword 'record'
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/calloutbinding/CalloutParameterBinding_LiftingAndLowering.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/calloutbinding/CalloutParameterBinding_LiftingAndLowering.java
index 5efd0c9..7616be8 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/calloutbinding/CalloutParameterBinding_LiftingAndLowering.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/calloutbinding/CalloutParameterBinding_LiftingAndLowering.java
@@ -23,6 +23,7 @@
import junit.framework.Test;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.eclipse.objectteams.otdt.tests.otjld.AbstractOTJLDTest;
@@ -369,13 +370,18 @@
"5. ERROR in Team321ciwmp6.java (at line 11)\n" +
" int doCalloutGetSomeFieldDoubled() -> get int someField\n" +
" ^^^\n" +
- "Syntax error on token \"int\", record expected\n" +
+ (this.complianceLevel <= ClassFileConstants.JDK13
+ ? "Syntax error on token \"int\", @ expected\\n\n"
+ : "Syntax error on token \"int\", record expected\n") +
"----------\n" +
"6. ERROR in Team321ciwmp6.java (at line 11)\n" +
" int doCalloutGetSomeFieldDoubled() -> get int someField\n" +
" with {\n" +
- " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "Syntax error on tokens, delete these tokens\n" +
+ (this.complianceLevel <= ClassFileConstants.JDK13
+ ? " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
+ "Syntax error on tokens, ClassHeader expected instead\n"
+ : " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
+ "Syntax error on tokens, delete these tokens\n") +
"----------\n" +
"7. ERROR in Team321ciwmp6.java (at line 12)\n" +
" with {\n" +
@@ -403,10 +409,16 @@
" ^\n" +
"Syntax error, insert \"EnumBody\" to complete ClassBodyDeclarations\n" +
"----------\n" +
- "12. ERROR in Team321ciwmp6.java (at line 14)\n" +
- " };\n" +
- " ^\n" +
- "Syntax error on token \"}\", { expected\n" +
+ (this.complianceLevel <= ClassFileConstants.JDK13
+ ? "12. ERROR in Team321ciwmp6.java (at line 15)\n" +
+ " }\n" +
+ "}\n" +
+ " ^^^\n" +
+ "Syntax error on tokens, delete these tokens\n"
+ : "12. ERROR in Team321ciwmp6.java (at line 14)\n" +
+ " };\n" +
+ " ^\n" +
+ "Syntax error on token \"}\", { expected\n") +
"----------\n"
);
}