lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [1/2] lucenenet git commit: Fixing some more tests
Date Sun, 01 Feb 2015 12:51:24 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master 7e134f196 -> 518b67620


Fixing some more tests


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

Branch: refs/heads/master
Commit: 394e32859224f6c467eab2f68ba5c1f747450280
Parents: 7e134f1
Author: Itamar Syn-Hershko <itamar@code972.com>
Authored: Sun Feb 1 14:50:51 2015 +0200
Committer: Itamar Syn-Hershko <itamar@code972.com>
Committed: Sun Feb 1 14:50:51 2015 +0200

----------------------------------------------------------------------
 .../core/Index/TestDocumentsWriterDeleteQueue.cs                 | 2 +-
 src/Lucene.Net.Tests/core/Index/TestMultiLevelSkipList.cs        | 2 +-
 src/Lucene.Net.Tests/core/Search/TestSubScorerFreqs.cs           | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/394e3285/src/Lucene.Net.Tests/core/Index/TestDocumentsWriterDeleteQueue.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestDocumentsWriterDeleteQueue.cs b/src/Lucene.Net.Tests/core/Index/TestDocumentsWriterDeleteQueue.cs
index f9a350c..c6317e6 100644
--- a/src/Lucene.Net.Tests/core/Index/TestDocumentsWriterDeleteQueue.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestDocumentsWriterDeleteQueue.cs
@@ -252,7 +252,7 @@ namespace Lucene.Net.Index
             }
             Assert.AreEqual(0, queue.NumGlobalTermDeletes(), "num deletes must be 0 after
freeze");
             Assert.AreEqual(uniqueValues.Count, frozenSet.Count);
-            Assert.AreEqual(uniqueValues, frozenSet);
+            Assert.True(uniqueValues.SetEquals(frozenSet));
         }
 
         private class UpdateThread : ThreadClass

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/394e3285/src/Lucene.Net.Tests/core/Index/TestMultiLevelSkipList.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestMultiLevelSkipList.cs b/src/Lucene.Net.Tests/core/Index/TestMultiLevelSkipList.cs
index 83f7490..1d93024 100644
--- a/src/Lucene.Net.Tests/core/Index/TestMultiLevelSkipList.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestMultiLevelSkipList.cs
@@ -120,7 +120,7 @@ namespace Lucene.Net.Index
             tp.NextPosition();
             BytesRef b = tp.Payload;
             Assert.AreEqual(1, b.Length);
-            Assert.AreEqual((sbyte)target, b.Bytes[b.Offset], "Wrong payload for the target
" + target + ": " + b.Bytes[b.Offset]);
+            Assert.AreEqual((sbyte)target, (sbyte)b.Bytes[b.Offset], "Wrong payload for the
target " + target + ": " + (sbyte)b.Bytes[b.Offset]);
         }
 
         private class PayloadAnalyzer : Analyzer

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/394e3285/src/Lucene.Net.Tests/core/Search/TestSubScorerFreqs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSubScorerFreqs.cs b/src/Lucene.Net.Tests/core/Search/TestSubScorerFreqs.cs
index 451108c..8b8f358 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSubScorerFreqs.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSubScorerFreqs.cs
@@ -182,9 +182,9 @@ namespace Lucene.Net.Search
             // see http://docs.oracle.com/javase/7/docs/api/java/lang/SafeVarargs.html
             IEnumerable<ISet<string>> occurList = Arrays.AsList(Collections.Singleton("MUST"),
new HashSet<string>(Arrays.AsList("MUST", "SHOULD")));
 
-            foreach (HashSet<string> occur in occurList)
+            foreach (var occur in occurList)
             {
-                CountingCollector c = new CountingCollector(TopScoreDocCollector.Create(10,
true), occur);
+                var c = new CountingCollector(TopScoreDocCollector.Create(10, true), occur);
                 s.Search(query, null, c);
                 int maxDocs = s.IndexReader.MaxDoc;
                 Assert.AreEqual(maxDocs, c.DocCounts.Count);


Mime
View raw message