lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sim...@apache.org
Subject [2/2] lucene-solr:branch_7x: [TEST] Never oversize bitset
Date Wed, 09 May 2018 17:10:54 GMT
[TEST] Never oversize bitset


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/72ae8db2
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/72ae8db2
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/72ae8db2

Branch: refs/heads/branch_7x
Commit: 72ae8db24c66dd6e5b5f892fa1a0e60bdbd362ab
Parents: 0c65af0
Author: Simon Willnauer <simonw@apache.org>
Authored: Wed May 9 19:10:36 2018 +0200
Committer: Simon Willnauer <simonw@apache.org>
Committed: Wed May 9 19:10:36 2018 +0200

----------------------------------------------------------------------
 .../core/src/test/org/apache/lucene/util/TestFixedBitSet.java  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/72ae8db2/lucene/core/src/test/org/apache/lucene/util/TestFixedBitSet.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/util/TestFixedBitSet.java b/lucene/core/src/test/org/apache/lucene/util/TestFixedBitSet.java
index 3b80540..25c7e41 100644
--- a/lucene/core/src/test/org/apache/lucene/util/TestFixedBitSet.java
+++ b/lucene/core/src/test/org/apache/lucene/util/TestFixedBitSet.java
@@ -499,8 +499,10 @@ public class TestFixedBitSet extends BaseBitSetTestCase<FixedBitSet>
{
     int numBits = TestUtil.nextInt(random, 1000, 2000);
     int count = TestUtil.nextInt(random, 0, numBits - 1);
     int[] bits = makeIntArray(random, count, 0, numBits - 1);
-    FixedBitSet fixedBitSet = makeFixedBitSet(bits, numBits);
-
+    FixedBitSet fixedBitSet = new FixedBitSet(numBits);
+    for (int e : bits) {
+      fixedBitSet.set(e);
+    }
     FixedBitSet mutableCopy = FixedBitSet.copyOf(fixedBitSet);
     assertNotSame(mutableCopy, fixedBitSet);
     assertEquals(mutableCopy, fixedBitSet);


Mime
View raw message