You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2022/06/20 16:18:35 UTC
[GitHub] [sling-org-apache-sling-scripting-sightly-compiler] raducotescu commented on a diff in pull request #10: SLING-11374 - Improve the details of the exceptions thrown by the BinaryOperator
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org