lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [06/50] [abbrv] lucenenet git commit: Added missing asserts in Core.Util.TestNumericUtils.TestLongConversionAndOrdering() and Core.Util.TestNumericUtils.TestIntConversionAndOrdering()
Date Sun, 23 Oct 2016 13:01:52 GMT
Added missing asserts in Core.Util.TestNumericUtils.TestLongConversionAndOrdering() and Core.Util.TestNumericUtils.TestIntConversionAndOrdering()


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

Branch: refs/heads/master
Commit: 5c4cffd41da929ee9a05cccc17aba8818e11e62e
Parents: aff0579
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Oct 16 05:25:52 2016 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Thu Oct 20 18:20:51 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Util/TestNumericUtils.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5c4cffd4/src/Lucene.Net.Tests/core/Util/TestNumericUtils.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestNumericUtils.cs b/src/Lucene.Net.Tests/core/Util/TestNumericUtils.cs
index b90c4b0..3d4267a 100644
--- a/src/Lucene.Net.Tests/core/Util/TestNumericUtils.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestNumericUtils.cs
@@ -38,7 +38,7 @@ namespace Lucene.Net.Util
                 {
                     // test if smaller
                     Assert.IsTrue(last.CompareTo(act) < 0, "actual bigger than last (BytesRef)");
-                    //Assert.IsTrue(last.Utf8ToString().CompareTo(act.Utf8ToString()) <
0, "actual bigger than last (as String)");
+                    Assert.IsTrue(last.Utf8ToString().CompareToOrdinal(act.Utf8ToString())
< 0, "actual bigger than last (as String)");
                 }
                 // test is back and forward conversion works
                 Assert.AreEqual(l, NumericUtils.PrefixCodedToLong(act), "forward and back
conversion should generate same long");
@@ -60,7 +60,7 @@ namespace Lucene.Net.Util
                 {
                     // test if smaller
                     Assert.IsTrue(last.CompareTo(act) < 0, "actual bigger than last (BytesRef)");
-                    //Assert.IsTrue(last.Utf8ToString().CompareTo(act.Utf8ToString()) <
0, "actual bigger than last (as String)");
+                    Assert.IsTrue(last.Utf8ToString().CompareToOrdinal(act.Utf8ToString())
< 0, "actual bigger than last (as String)");
                 }
                 // test is back and forward conversion works
                 Assert.AreEqual(i, NumericUtils.PrefixCodedToInt(act), "forward and back
conversion should generate same int");


Mime
View raw message