lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [09/13] git commit: Revert "Fixed TestLongBitSet.TestPrevSetBit"
Date Mon, 15 Sep 2014 22:53:00 GMT
Revert "Fixed TestLongBitSet.TestPrevSetBit"

This reverts commit 9b2187e6ff1b27cf60c9d6671d3b8644cc0f8dcb.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/a3b7505f
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/a3b7505f
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/a3b7505f

Branch: refs/heads/master
Commit: a3b7505fb3160e08d9993635dd35a1c2c2f72c4c
Parents: 9b2187e
Author: Prad Nelluru <prnell@microsoft.com>
Authored: Fri Sep 12 15:18:20 2014 -0700
Committer: Prad Nelluru <prnell@microsoft.com>
Committed: Fri Sep 12 15:18:20 2014 -0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Support/BitSetSupport.cs              | 2 +-
 src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs | 2 +-
 src/Lucene.Net.Tests/core/Util/TestLongBitSet.cs          | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a3b7505f/src/Lucene.Net.Core/Support/BitSetSupport.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/BitSetSupport.cs b/src/Lucene.Net.Core/Support/BitSetSupport.cs
index 3ffa0a8..7b816d0 100644
--- a/src/Lucene.Net.Core/Support/BitSetSupport.cs
+++ b/src/Lucene.Net.Core/Support/BitSetSupport.cs
@@ -58,7 +58,7 @@ namespace Lucene.Net.Support
             {
                 // if index bit is set, return it
                 // otherwise check previous index bit
-                if (bitArray.SafeGet(index))
+                if (bitArray.Get(index))
                     return index;
                 index--;
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a3b7505f/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs b/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
index 76c5265..786eeb4 100644
--- a/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Util/BaseDocIdSetTestCase.cs
@@ -142,7 +142,7 @@ namespace Lucene.Net.Util
             copy_ = CopyOf(set_, numBits); // then random index
             AssertEquals(numBits, set_, copy_);
             // test regular increments
-            for (int inc = 2; inc < 10; inc += TestUtil.NextInt(Random(), 1, 100))
+            for (int inc = 2; inc < 1000; inc += TestUtil.NextInt(Random(), 1, 100))
             {
                 set_ = new BitArray(numBits);
                 for (int d = Random().Next(10); d < numBits; d += inc)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a3b7505f/src/Lucene.Net.Tests/core/Util/TestLongBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestLongBitSet.cs b/src/Lucene.Net.Tests/core/Util/TestLongBitSet.cs
index a9264e8..1c7f626 100644
--- a/src/Lucene.Net.Tests/core/Util/TestLongBitSet.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestLongBitSet.cs
@@ -55,9 +55,9 @@ namespace Lucene.Net.Util
             long bb = aa;
             do
             {
-                //aa = a.PrevSetBit(aa-1);
+                aa = a.PrevSetBit(aa-1);
                 aa--;
-                while ((aa >= 0) && (!a.SafeGet(aa)))
+                while ((aa >= 0) && (!a.Get(aa)))
                 {
                     aa--;
                 }
@@ -318,7 +318,7 @@ namespace Lucene.Net.Util
             BitArray bs = new BitArray(a.Length);
             foreach (int e in a)
             {
-                bs.SafeSet(e, true);
+                bs.Set(e, true);
             }
             return bs;
         }


Mime
View raw message