Yuti-G commented on code in PR #1013:
URL: https://github.com/apache/lucene/pull/1013#discussion_r919502708


##########
lucene/facet/src/test/org/apache/lucene/facet/FacetTestCase.java:
##########
@@ -264,4 +264,24 @@ protected void assertFloatValuesEquals(FacetResult a, 
FacetResult b) {
           a.labelValues[i].value.floatValue() / 1e5);
     }
   }
+
+  protected void assertNumericValuesEquals(Number a, Number b) {
+    assertTrue(a.getClass().isInstance(b));
+    if (a instanceof Float) {
+      assertEquals(a.floatValue(), b.floatValue(), a.floatValue() / 1e5);
+    } else if (a instanceof Double) {
+      assertEquals(a.doubleValue(), b.doubleValue(), a.doubleValue() / 1e5);
+    } else {
+      assertEquals(a, b);
+    }
+  }
+
+  protected void assertAllChildrenEqualsWithoutOrdering(FacetResult a, 
FacetResult b) {

Review Comment:
   Thanks for the feedback! I addressed it in the new commit. Since we renamed 
the method to a generic name `assertFacetResult`, I added a comment `// assert 
children equal with no assumption of the children ordering` to inform future 
users in case they try to use this assert method but care about children 
ordering e.g., getTopChildren. Please let me know what you think. Thanks!



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to