lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [04/26] lucenenet git commit: BUG: Lucene.Net.Tests.QueryParser.Classic.TestQueryParser.TestFuzzySlopeExtendability() - Fixed the test to parse and format the values using the invariant culture
Date Wed, 08 Mar 2017 18:23:40 GMT
BUG: Lucene.Net.Tests.QueryParser.Classic.TestQueryParser.TestFuzzySlopeExtendability() - Fixed
the test to parse and format the values using the invariant culture


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

Branch: refs/heads/api-work
Commit: e316765139433d3d681a28330f273121d7a33e87
Parents: 7cd1179
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Wed Mar 8 00:18:43 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Wed Mar 8 00:18:43 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e3167651/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs b/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs
index 4f4924d..d246c72 100644
--- a/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Classic/TestQueryParser.cs
@@ -8,7 +8,7 @@ using Lucene.Net.Support;
 using NUnit.Framework;
 using System;
 using System.Diagnostics;
-using System.Reflection;
+using System.Globalization;
 
 namespace Lucene.Net.QueryParsers.Classic
 {
@@ -175,11 +175,11 @@ namespace Lucene.Net.QueryParsers.Classic
                     float fms = FuzzyMinSim;
                     try
                     {
-                        fms = float.Parse(fuzzySlop.Image.Substring(1, fuzzySlop.Image.Length
- 2));
+                        fms = float.Parse(fuzzySlop.Image.Substring(1, fuzzySlop.Image.Length
- 2), CultureInfo.InvariantCulture);
                     }
                     catch (Exception /*ignored*/) { }
-                    float value = float.Parse(termImage);
-                    return GetRangeQuery(qfield, (value - fms / 2.0f).ToString(), (value
+ fms / 2.0f).ToString(), true, true);
+                    float value = float.Parse(termImage, CultureInfo.InvariantCulture);
+                    return GetRangeQuery(qfield, (value - fms / 2.0f).ToString(CultureInfo.InvariantCulture),
(value + fms / 2.0f).ToString(CultureInfo.InvariantCulture), true, true);
                 }
                 return base.HandleBareFuzzy(qfield, fuzzySlop, termImage);
             }


Mime
View raw message