[Mono-dev] Incorrect VB test?

Rolf Bjarne Kvinge rolflists at ya.com
Wed Jul 11 05:25:54 EDT 2007

>From: mono-devel-list-bounces at lists.ximian.com
[mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of Sasha Kogan
>Sent: jueves, 05 de julio de 2007 17:47
>To: mono-devel-list at lists.ximian.com
>Subject: [Mono-dev] Incorrect VB test?
>In DateAdd() (DateAndTimeTests.cs: 141) System.Exception is checked to be
thrown, while MSDN (
http://msdn2.microsoft.com/en-us/library/hcxe65wz(VS.80).aspx )states
ArgumentOutOfRangeException should be thrown in this case. So, >what's the
reason to check for System.Exception here?

Generally we don't believe what MSDN says, we only believe what the MS code
actually does (and there are many cases where MSDN says something and their
code does something completely different).

>BTW, on .NET 2.0 DateAndTime.DateAdd(DateInterval.Year, int.MinValue,
DateTime.Now) executes with no exception and just returns the third arg

In this case however the test looks at least bad, if not wrong, I'll have a
look at it and make it better.



More information about the Mono-devel-list mailing list