lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [19/23] lucenenet git commit: Lucene.Net.TestFramework.Search.CheckHits: Fixed verification of description by using the current culture instead of the invariant culture for parsing.
Date Sun, 19 Mar 2017 23:20:14 GMT
Lucene.Net.TestFramework.Search.CheckHits: Fixed verification of description by using the current
culture instead of the invariant culture for parsing.


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

Branch: refs/heads/api-work
Commit: 747a4d75465a3246ebe5b57a5348694c63832dec
Parents: 7298ecb
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Mon Mar 20 02:35:08 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Mon Mar 20 02:35:08 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.TestFramework/Search/CheckHits.cs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/747a4d75/src/Lucene.Net.TestFramework/Search/CheckHits.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Search/CheckHits.cs b/src/Lucene.Net.TestFramework/Search/CheckHits.cs
index 2e0a46e..ab9ee60 100644
--- a/src/Lucene.Net.TestFramework/Search/CheckHits.cs
+++ b/src/Lucene.Net.TestFramework/Search/CheckHits.cs
@@ -393,7 +393,9 @@ namespace Lucene.Net.Search
                             int k2 = descr.IndexOf(" ", k1);
                             try
                             {
-                                x = Convert.ToSingle(descr.Substring(k1, k2 - k1).Trim(),
CultureInfo.InvariantCulture);
+                                // LUCENENET NOTE: Using current culture here is intentional
because
+                                // we are parsing from text that was made using the current
culture.
+                                x = Convert.ToSingle(descr.Substring(k1, k2 - k1).Trim());
                                 if (descr.Substring(k2).Trim().Equals("times others of:",
StringComparison.Ordinal))
                                 {
                                     maxTimesOthers = true;


Mime
View raw message