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:41:01 UTC

[GitHub] [sling-org-apache-sling-scripting-sightly-compiler] ashokmca07 commented on a diff in pull request #10: SLING-11374 - Improve the details of the exceptions thrown by the BinaryOperator

ashokmca07 commented on code in PR #10:
URL: https://github.com/apache/sling-org-apache-sling-scripting-sightly-compiler/pull/10#discussion_r901850496


##########
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:
   @raducotescu: I have added test coverage for `string to number` and corrected the relevant messages



-- 
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