[Mono-devel-list] Re: Single and double formatter changes

yoros at wanadoo.es yoros at wanadoo.es
Tue Mar 4 18:06:41 EST 2003


On Tue, Mar 04, 2003 at 12:53:13PM +0000, Dick Porter wrote:
> The changes you committed yesterday broke nunit:
> 
> Unhandled Exception: System.FormatException: The specified format is invalid
> in <0x0007e> 00 System.DoubleFormatter:NumberToString (string,System.Globalization.NumberFormatInfo,double)
> in <0x00145> 00 NUnit.Core.XmlResultVisitor:visit (NUnit.Core.TestCaseResult)
> in <0x00020> 00 NUnit.Core.TestCaseResult:Accept (NUnit.Core.ResultVisitor)
> in <0x001ec> 00 NUnit.Core.XmlResultVisitor:visit (NUnit.Core.TestSuiteResult)
> in <0x00020> 00 NUnit.Core.TestSuiteResult:Accept (NUnit.Core.ResultVisitor)
> in <0x001ec> 00 NUnit.Core.XmlResultVisitor:visit (NUnit.Core.TestSuiteResult)
> in <0x00020> 00 NUnit.Core.TestSuiteResult:Accept (NUnit.Core.ResultVisitor)
> in <0x000dd> 00 NUnit.Console.ConsoleUi:Execute ()
> in <0x0038b> 00 NUnit.Console.ConsoleUi:Main (string[])
> 
> 
> Reverting the Single.cs, Double.cs and icall.c changes makes it work
> again.
> 
> I've reverted the change in CVS for now, and attached the diff here so
> you can fix it and try again.

I throw that exception because in MS.NET documentation I found this
specification:

D or d
Decimal
This format is supported for integral types only. The number is
converted to a string of decimal digits (0-9), prefixed by a minus sign
if the number is negative. The precision specifier indicates the minimum
number of digits desired in the resulting string. If required, the
number is padded with zeros to its left to produce the number of digits
given by the precision specifier.

I found it in:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconstandardnumericformatstrings.asp

What must I do at this point?

Good, now I will change that method for using General formatting in the
"Decimal" cases. I will wait for a few days to commit the changes (Now I
have no time to do anything).

Regards,

    Pedro

-- 
Pedro Martinez Juliá
\  yoros at terra.es
)|    yoros at wanadoo.es
/        http://yoros.cjb.net
Socio HispaLinux #311
Usuario Linux #275438 - http://counter.li.org
GnuPG public information:  pub  1024D/74F1D3AC
Key fingerprint = 8431 7B47 D2B4 5A46 5F8E  534F 588B E285 74F1 D3AC



More information about the Mono-devel-list mailing list