lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [2/2] lucenenet git commit: Fix for TestIndexableField.TestArbitraryFields - In java, the byte class is signed and in C# it is unsigned. Changed the unit test to cast to a (byte) insetad of an (sbyte).
Date Wed, 18 Feb 2015 05:49:29 GMT
Fix for TestIndexableField.TestArbitraryFields - In java, the byte class is signed and in C#
it is unsigned. Changed the unit test to cast to a (byte) insetad of an (sbyte).

An alternate much deeper fix would be to change the Lucene.Net.Util.BytesRef class to use
sbyte insetad of byte. Not sure if this class was intentionally setup this way or if it is
a conversion error. Comments please.


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

Branch: refs/heads/master
Commit: ecdbcbb6679e2b3deb7fc73312ad40b1e37cc3fe
Parents: ffb1cd5
Author: Chand2048 <Chand@Microsoft.com>
Authored: Wed Feb 11 10:14:46 2015 -0800
Committer: Itamar Syn-Hershko <itamar@code972.com>
Committed: Wed Feb 18 07:46:32 2015 +0200

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Index/TestIndexableField.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ecdbcbb6/src/Lucene.Net.Tests/core/Index/TestIndexableField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestIndexableField.cs b/src/Lucene.Net.Tests/core/Index/TestIndexableField.cs
index 5d49c99..d4afb52 100644
--- a/src/Lucene.Net.Tests/core/Index/TestIndexableField.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestIndexableField.cs
@@ -307,7 +307,7 @@ namespace Lucene.Net.Index
                             Assert.AreEqual(10, b.Length);
                             for (int idx = 0; idx < 10; idx++)
                             {
-                                Assert.AreEqual((sbyte)(idx + counter), b.Bytes[b.Offset
+ idx]);
+                                Assert.AreEqual((byte)(idx + counter), b.Bytes[b.Offset +
idx]);
                             }
                         }
                         else


Mime
View raw message