lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [38/50] [abbrv] lucenenet git commit: BUG: Lucene.Net.Tests.Util.TestFieldCacheSanityChecker: Must format the fields using invariant culture (verified they work that way in Java)
Date Sun, 05 Mar 2017 11:49:17 GMT
BUG: Lucene.Net.Tests.Util.TestFieldCacheSanityChecker: Must format the fields using invariant
culture (verified they work that way in Java)


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

Branch: refs/heads/api-work
Commit: eac64ed66975d0dd57b9181f6b93b1df44712c9e
Parents: 22c1d81
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Mar 5 04:57:43 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Mar 5 17:08:47 2017 +0700

----------------------------------------------------------------------
 .../Util/TestFieldCacheSanityChecker.cs                | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/eac64ed6/src/Lucene.Net.Tests/Util/TestFieldCacheSanityChecker.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Util/TestFieldCacheSanityChecker.cs b/src/Lucene.Net.Tests/Util/TestFieldCacheSanityChecker.cs
index 25ed72c..63243db 100644
--- a/src/Lucene.Net.Tests/Util/TestFieldCacheSanityChecker.cs
+++ b/src/Lucene.Net.Tests/Util/TestFieldCacheSanityChecker.cs
@@ -2,6 +2,7 @@ using Lucene.Net.Documents;
 using Lucene.Net.Search;
 using NUnit.Framework;
 using System;
+using System.Globalization;
 using System.IO;
 
 namespace Lucene.Net.Util
@@ -64,13 +65,13 @@ namespace Lucene.Net.Util
             for (int i = 0; i < NUM_DOCS; i++)
             {
                 Document doc = new Document();
-                doc.Add(NewStringField("theLong", Convert.ToString(theLong--), Field.Store.NO));
-                doc.Add(NewStringField("theDouble", theDouble.ToString("R"), Field.Store.NO));
+                doc.Add(NewStringField("theLong", Convert.ToString(theLong--, CultureInfo.InvariantCulture),
Field.Store.NO));
+                doc.Add(NewStringField("theDouble", theDouble.ToString("R", CultureInfo.InvariantCulture),
Field.Store.NO));
                 theDouble--;
-                doc.Add(NewStringField("theByte", Convert.ToString(theByte--), Field.Store.NO));
-                doc.Add(NewStringField("theShort", Convert.ToString(theShort--), Field.Store.NO));
-                doc.Add(NewStringField("theInt", Convert.ToString(theInt--), Field.Store.NO));
-                doc.Add(NewStringField("theFloat", Convert.ToString(theFloat--), Field.Store.NO));
+                doc.Add(NewStringField("theByte", Convert.ToString(theByte--, CultureInfo.InvariantCulture),
Field.Store.NO));
+                doc.Add(NewStringField("theShort", Convert.ToString(theShort--, CultureInfo.InvariantCulture),
Field.Store.NO));
+                doc.Add(NewStringField("theInt", Convert.ToString(theInt--, CultureInfo.InvariantCulture),
Field.Store.NO));
+                doc.Add(NewStringField("theFloat", Convert.ToString(theFloat--, CultureInfo.InvariantCulture),
Field.Store.NO));
                 if (0 == i % 3)
                 {
                     wA.AddDocument(doc);


Mime
View raw message