You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2013/10/15 03:52:24 UTC

svn commit: r1532161 - /lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/util/TestOpenBitSet.java

Author: rmuir
Date: Tue Oct 15 01:52:23 2013
New Revision: 1532161

URL: http://svn.apache.org/r1532161
Log:
LUCENE-5272: fix test bugs

Modified:
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/util/TestOpenBitSet.java

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/util/TestOpenBitSet.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/util/TestOpenBitSet.java?rev=1532161&r1=1532160&r2=1532161&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/util/TestOpenBitSet.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/util/TestOpenBitSet.java Tue Oct 15 01:52:23 2013
@@ -349,7 +349,7 @@ public class TestOpenBitSet extends Base
     // test ensureCapacityWords
     int numWords = random().nextInt(10) + 2; // make sure we grow the array (at least 128 bits)
     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);
     assertTrue(bits.fastGet(bit));
     bits.fastClear(bit);