LUCENE-5272: fix more test bugs

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1532322 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2013-10-15 12:57:12 +00:00
parent e572dce1e5
commit dcbb3cc793
1 changed files with 3 additions and 3 deletions

View File

@ -335,11 +335,11 @@ public class TestOpenBitSet extends BaseDocIdSetTestCase<OpenBitSet> {
OpenBitSet bits = new OpenBitSet(1);
int bit = random().nextInt(100) + 10;
bits.ensureCapacity(bit); // make room for more bits
bits.fastSet(bit-1);
assertTrue(bits.fastGet(bit-1));
bits.ensureCapacity(bit + 1);
bits.fastSet(bit);
assertTrue(bits.fastGet(bit));
bits.ensureCapacity(bit + 1);
bits.fastSet(bit + 1);
assertTrue(bits.fastGet(bit + 1));
bits.ensureCapacity(3); // should not change numBits nor grow the array
bits.fastSet(3);
assertTrue(bits.fastGet(3));