mayya-sharipova commented on code in PR #16261:
URL: https://github.com/apache/lucene/pull/16261#discussion_r3432593361


##########
lucene/core/src/test/org/apache/lucene/analysis/TestCharArraySet.java:
##########
@@ -373,8 +373,34 @@ public void testContainsWithNull() {
 
   public void testToString() {
     CharArraySet set = CharArraySet.copy(Collections.singleton("test"));
-    assertEquals("[test]", set.toString());
+    assertEquals("[test](ignoreCase=false)", set.toString());
     set.add("test2");
     assertTrue(set.toString().contains(", "));
+
+    CharArraySet ignoreCase = new CharArraySet(Collections.singleton("test"), 
true);
+    assertEquals("[test](ignoreCase=true)", ignoreCase.toString());
+  }
+
+  public void testEqualsAndHashCode_sameContentSameIgnoreCase() {
+    for (boolean ignoreCase : new boolean[] {false, true}) {
+      CharArraySet a = new CharArraySet(Arrays.asList(TEST_STOP_WORDS), 
ignoreCase);
+      CharArraySet b = new CharArraySet(Arrays.asList(TEST_STOP_WORDS), 
ignoreCase);
+      assertNotSame(a, b);
+      assertEquals(a, b);
+      assertEquals(a.hashCode(), b.hashCode());
+    }
+  }

Review Comment:
   Addressed in b3257df02c0d1434508149c24717656dd0f97bb3



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