[Mono-list] testcase for System.Convert complete...

Miguel de Icaza miguel@ximian.com
16 May 2002 16:19:19 -0400

Hello Krister!

> Finally first testcase completed   :)
> It is attached to this mail as ConvertTest.cs

Wonderful job!  I have now included this on the CVS repository, and will
be running my own test myself this afternoon (Duncan has to help me get
setup  for that ;-)

> Have had some problems with TestFromBase64CharArray and TestFromBase64String they both made an error about a unicode file. A file that generates that error is also attached to this message as test.cs

Could you enter this error into http://bugzilla.ximian.com, so we can
keep track of these bugs?  (maybe you already have?)

> AssertEquals("#H11", (decimal)23456.432, Convert.ToDecimal("23456,432"));
> TestToDecimal(MonoTests.System.ConvertTest) "#H11 expected:<23456.432> but was:<23456432>"
> AssertEquals("#I11", (double)23456.432, Convert.ToDouble("23456,432"));
> TestToDouble(MonoTests.System.ConvertTest) "#I11 expected:<23456.432> but was:<23456432>"

Very interesting
> It looks like there are some differences with how mono an mcs interprets '.' and ',' because when I change the string in one test like this
> AssertEquals("#I11", (double)23456.432, Convert.ToDouble("23456.432")); //exchanged the ',' to '.'

Seems like the code is just ignoring the ",", assuming that it is a
thousand separator.  Maybe Nick can tell us more about this, because I
know he has been hunting this sort of problems before.

> Please get back to me with any types of complaints or comments on the test

No complains from me.  Just wanted to thank you guys for authoring the
regression tests.