You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2019/09/06 09:01:13 UTC

[lucenenet] 03/21: BUG: Lucene.Net.Tests.Util.TestVersionComparer::TestVersions(): Version number to string must be done in the invariant culture (fixes LUCENENET-622)

This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit b3daddc739f9329d0aa6e8dbfe04744f93106837
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Sun Sep 1 16:09:28 2019 +0700

    BUG: Lucene.Net.Tests.Util.TestVersionComparer::TestVersions(): Version number to string must be done in the invariant culture (fixes LUCENENET-622)
---
 src/Lucene.Net.Tests/Util/TestVersionComparator.cs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Lucene.Net.Tests/Util/TestVersionComparator.cs b/src/Lucene.Net.Tests/Util/TestVersionComparator.cs
index b365218..942bad8 100644
--- a/src/Lucene.Net.Tests/Util/TestVersionComparator.cs
+++ b/src/Lucene.Net.Tests/Util/TestVersionComparator.cs
@@ -1,6 +1,7 @@
 using NUnit.Framework;
 using System;
 using System.Collections.Generic;
+using System.Globalization;
 
 namespace Lucene.Net.Util
 {
@@ -53,7 +54,7 @@ namespace Lucene.Net.Util
             Assert.IsTrue(comp.Compare("0", "1.0") < 0);
             Assert.IsTrue(comp.Compare("00", "1.0") < 0);
             Assert.IsTrue(comp.Compare("-1.0", "1.0") < 0);
-            Assert.IsTrue(comp.Compare("3.0", Convert.ToString(int.MinValue)) > 0);
+            Assert.IsTrue(comp.Compare("3.0", Convert.ToString(int.MinValue, CultureInfo.InvariantCulture)) > 0);
         }
     }
 }
\ No newline at end of file