[Mono-list] Re: Overflow exception in Parse

Miguel de Icaza miguel@ximian.com
26 Dec 2001 18:18:59 -0500


Hey Nick!

> The tests for the Parse methods are *not* catching the Overflow
> exceptions that are generated by the "shift and accumulate" statements,
> e.g.
> 	val = checked (val * 10 + d);
> 
> I was working specifically with UInt32Test.cs to figure out why the test
> was failing in the first place, but then I noticed all the tests for
> Parse are not catching the Overflow exception like they should. I'm not
> entirely sure that line of code is the problem, but for sure an Overflow
> exception is being missed by the tests and caught by Nunit itself.  Do
> 'make test' to see for yourself.

Wow.  This is rather strange.  I have to say that my machine at home was
unable to run NUnit after the first time (I do not know what happened
there) so I could not do more testing at that point, I had to write a
small wrapper and write the tests outside NUnit.

I am not sure why NUnit would be catching those errors itself, it does
not seem right.

On the other hand, I have another problem right now: we are shipping
binaries for NUnit and Nant, and they do not work right with the Release
Candidate 0 (I have machines running with RC0 and Beta2), I think we
should include the source code for Nant and Nunit with the package to
avoid this problem, it would also be helpful to track the problems like
this one down.  What do you think?

Miguel.