fixing error handling in 'is' operator

This commit is contained in:
Andy Clement
2008-08-17 01:27:45 +00:00
parent 5c0d80ece7
commit 29fe8da1ad
2 changed files with 25 additions and 9 deletions

View File

@@ -56,4 +56,11 @@ public class ParserErrorMessagesTests extends ExpressionTestCase {
parseAndCheckError("1;2;3", SpelMessages.PARSE_PROBLEM, 1, "mismatched input ';' expecting EOF"); // POOR
evaluate("(1;2;3)", 3, Integer.class);
}
public void testBrokenExpression07() {
// T() can only take an identifier (possibly qualified), not a literal
// message ought to say identifier rather than ID
parseAndCheckError("null is T('a')", SpelMessages.PARSE_PROBLEM, 10, "mismatched input ''a'' expecting ID"); // POOR
}
}