iverase commented on code in PR #16077:
URL: https://github.com/apache/lucene/pull/16077#discussion_r3257515470
##########
lucene/core/src/test/org/apache/lucene/util/TestRoaringDocIdSet.java:
##########
@@ -36,4 +37,75 @@ public void assertEquals(int numBits, BitSet ds1,
RoaringDocIdSet ds2) throws IO
super.assertEquals(numBits, ds1, ds2);
assertEquals(ds1.cardinality(), ds2.cardinality());
}
+
+ public void testDocIDRunEndContiguousWithinBlock() throws IOException {
+ final int maxDoc = 50_000;
+ BitSet bs = new BitSet();
+ for (int d = 12_345; d < 12_360; d++) {
+ bs.set(d);
+ }
+ RoaringDocIdSet set = copyOf(bs, maxDoc);
+ assertDocIDRunEndMatches(bs, maxDoc, set);
+ }
+
+ public void testDocIDRunEndAcross64KBoundary() throws IOException {
+ final int boundary = 1 << 16;
+ final int maxDoc = boundary + 100;
+ BitSet bs = new BitSet();
+ for (int d = boundary - 3; d < boundary + 7; d++) {
+ bs.set(d);
+ }
+ RoaringDocIdSet set = copyOf(bs, maxDoc);
+ assertDocIDRunEndMatches(bs, maxDoc, set);
+ }
+
Review Comment:
done
--
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]