mirror of https://github.com/apache/lucene.git
LUCENE-5272: fix test bugs
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1532161 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
89c83b40d3
commit
9e258d224d
|
@ -349,7 +349,7 @@ public class TestOpenBitSet extends BaseDocIdSetTestCase<OpenBitSet> {
|
||||||
// test ensureCapacityWords
|
// test ensureCapacityWords
|
||||||
int numWords = random().nextInt(10) + 2; // make sure we grow the array (at least 128 bits)
|
int numWords = random().nextInt(10) + 2; // make sure we grow the array (at least 128 bits)
|
||||||
bits.ensureCapacityWords(numWords);
|
bits.ensureCapacityWords(numWords);
|
||||||
bit = _TestUtil.nextInt(random(), 128, numWords << 6); // pick a higher bit than 128, but still within range
|
bit = _TestUtil.nextInt(random(), 127, (numWords << 6)-1); // pick a bit >= to 128, but still within range
|
||||||
bits.fastSet(bit);
|
bits.fastSet(bit);
|
||||||
assertTrue(bits.fastGet(bit));
|
assertTrue(bits.fastGet(bit));
|
||||||
bits.fastClear(bit);
|
bits.fastClear(bit);
|
||||||
|
|
Loading…
Reference in New Issue