raducotescu commented on code in PR #10:
URL:
https://github.com/apache/sling-org-apache-sling-scripting-sightly-compiler/pull/10#discussion_r901835958
##########
src/test/java/org/apache/sling/scripting/sightly/compiler/expression/nodes/BinaryOperatorTest.java:
##########
@@ -106,4 +106,44 @@ public void testStrictEqWrongType() {
}
+ @RunWith(Parameterized.class)
+ public static class NumberError {
+
+ @Parameters(name = "Comparison: {2}")
+ public static Iterable<? extends Object> data() {
+ List<Object[]> list = new ArrayList<>();
+ list.add(new Object[]{1, new Object(), "number to object not
equal"});
+ list.add(new Object[]{new Object(), 2, "object to number not
equal"});
+ list.add(new Object[]{TestEnum.ONE, 1, "String to number not
equal"});
Review Comment:
Here I think the correct message is "enum to number not equal". You would
need a different test for comparing a String to a number.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]