fixed some tests that will now break because int/long can be treated as boolean. May need to change again if real numbers get the same treatment.

This commit is contained in:
Andy Clement
2008-08-16 01:43:51 +00:00
parent 8d8a82b278
commit d2ab889b00

View File

@@ -56,11 +56,11 @@ public class BooleanExpressionTests extends ExpressionTestCase {
}
public void testBooleanErrors01() {
evaluateAndCheckError("1 or false", SpelMessages.TYPE_CONVERSION_ERROR, 0);
evaluateAndCheckError("false or 39", SpelMessages.TYPE_CONVERSION_ERROR, 9);
evaluateAndCheckError("1.0 or false", SpelMessages.TYPE_CONVERSION_ERROR, 0);
evaluateAndCheckError("false or 39.4", SpelMessages.TYPE_CONVERSION_ERROR, 9);
evaluateAndCheckError("true and 'hello'", SpelMessages.TYPE_CONVERSION_ERROR, 9);
evaluateAndCheckError(" 'hello' and 'goodbye'", SpelMessages.TYPE_CONVERSION_ERROR, 1);
evaluateAndCheckError("!35", SpelMessages.TYPE_CONVERSION_ERROR, 1);
evaluateAndCheckError("!35.2", SpelMessages.TYPE_CONVERSION_ERROR, 1);
evaluateAndCheckError("! 'foob'", SpelMessages.TYPE_CONVERSION_ERROR, 2);
}
}