mirror of https://github.com/apache/lucene.git
random.nextInt does not take '0' as a valid argument, so ensure numBits is never 0
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1147534 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
561723eca6
commit
fb70c7c06c
|
@ -197,7 +197,7 @@ public class TestFixedBitSet extends LuceneTestCase {
|
|||
*/
|
||||
|
||||
public void testEquals() {
|
||||
final int numBits = random.nextInt(2000);
|
||||
final int numBits = random.nextInt(2000) + 1 /* numBits cannot be 0 */;
|
||||
FixedBitSet b1 = new FixedBitSet(numBits);
|
||||
FixedBitSet b2 = new FixedBitSet(numBits);
|
||||
assertTrue(b1.equals(b2));
|
||||
|
|
Loading…
Reference in New Issue