You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ar...@apache.org on 2009/11/11 05:32:10 UTC

svn commit: r834760 - /incubator/lucene.net/trunk/C#/src/Lucene.Net/Util/ToStringUtils.cs

Author: aroush
Date: Wed Nov 11 04:32:10 2009
New Revision: 834760

URL: http://svn.apache.org/viewvc?rev=834760&view=rev
Log:
Fixed NUnit test-cases for: TestBoostsSimple

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Util/ToStringUtils.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Util/ToStringUtils.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Util/ToStringUtils.cs?rev=834760&r1=834759&r2=834760&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Util/ToStringUtils.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Util/ToStringUtils.cs Wed Nov 11 04:32:10 2009
@@ -28,7 +28,10 @@
 		{
 			if (boost != 1.0f)
 			{
-				return "^" + boost.ToString();
+                float boostAsLong = (long) boost;
+                if (boostAsLong == boost)
+                    return "^" + boost.ToString(".0").Replace(System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator, ".");
+                return "^" + boost.ToString().Replace(System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator, ".");
 			}
 			else
 				return "";