lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lai...@apache.org
Subject lucenenet git commit: try different output
Date Sat, 30 May 2015 19:29:55 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/failingtests 3a19ccb86 -> 0ddd91a14


try different output


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

Branch: refs/heads/failingtests
Commit: 0ddd91a14f9d0c270eb1ffe2b4ffda1e6c0fa2fc
Parents: 3a19ccb
Author: Laimonas Simutis <laimis@gmail.com>
Authored: Sat May 30 15:29:36 2015 -0400
Committer: Laimonas Simutis <laimis@gmail.com>
Committed: Sat May 30 15:29:36 2015 -0400

----------------------------------------------------------------------
 src/Lucene.Net.TestFramework/Search/QueryUtils.cs | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0ddd91a1/src/Lucene.Net.TestFramework/Search/QueryUtils.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Search/QueryUtils.cs b/src/Lucene.Net.TestFramework/Search/QueryUtils.cs
index e28fbfa..8afb3aa 100644
--- a/src/Lucene.Net.TestFramework/Search/QueryUtils.cs
+++ b/src/Lucene.Net.TestFramework/Search/QueryUtils.cs
@@ -479,19 +479,15 @@ namespace Lucene.Net.Search
                         Assert.IsTrue(scorer_.Advance(i) != DocIdSetIterator.NO_MORE_DOCS,
"query collected " + doc + " but skipTo(" + i + ") says no more docs!");
                         Assert.AreEqual(doc, scorer_.DocID(), "query collected " + doc +
" but skipTo(" + i + ") got to " + scorer_.DocID());
                         float skipToScore = scorer_.Score();
-                        float secondScore = scorer_.Score();
-                        sb.AppendLine("Comparing equality:");
-                        sb.AppendLine(skipToScore.ToString());
-                        sb.AppendLine(secondScore.ToString());
                         try
                         {
-                            Assert.IsTrue(Math.Abs(skipToScore - secondScore) < MaxDiff,
-                                          "unstable skipTo(" + i + ") score!");
+                            Assert.IsTrue(Math.Abs(skipToScore - scorer_.Score()) < MaxDiff,
"unstable skipTo(" + i + ") score!");
                         }
                         catch (AssertionException ex)
                         {
-                            Console.WriteLine("Failed. Collected output:");
-                            Console.WriteLine(sb.ToString());
+                            Console.WriteLine("Failed, these two were deemed not equal:");
+                            Console.WriteLine(skipToScore);
+                            Console.WriteLine(scorer_.Score());
                             throw;
                         }
 


Mime
View raw message