On Wed, Aug 26, 2015 at 10:47:07PM +0100, Jo Shields wrote: > > > On 26/08/15 22:44, Lennart Sorensen wrote: > > > >I managed to get failure 1 and 2 above to go away by changing the test > >slightly: > > > >diff --git a/mcs/class/corlib/Test/System/DateTimeTest.cs > >b/mcs/class/corlib/Test/System/DateTimeTest.cs > >index 0e3076b..2db099c 100644 > >--- a/mcs/class/corlib/Test/System/DateTimeTest.cs > >+++ b/mcs/class/corlib/Test/System/DateTimeTest.cs > >@@ -235,7 +235,7 @@ namespace MonoTests.System > > public void AddHoursOutOfRangeException1 () > > { > > DateTime t1 = new DateTime (myTicks [1]); > >- t1.AddHours (9E100); > >+ t1.AddHours (9E10); > > } > > [Test] > >@@ -243,7 +243,7 @@ namespace MonoTests.System > > public void AddHoursOutOfRangeException2 () > > { > > DateTime t1 = new DateTime (myTicks [1]); > >- t1.AddHours (-9E100); > >+ t1.AddHours (-9E10); > > } > > [Test] > > > >So somehow it seems those enourmous values must be getting wrapped and > >ending up not being out of range, while reducing it to a more sane size > >does correctly trigger the exception. This seems to indicate there is > >a problem somewhere, but not sure what yet. > > > >Given the number of hours in 10000 years (the limit) is 87600000, 9E10 is > >plenty, and 9E100 is overkill and may be triggering a different exception. > > > I'm not comfortable saying I agree or disagree with you on this one > (changing tests to make a bug go away always seems yucky to me), but it's > worth discussing that one with the runtime engineers on mono-devel@ ?
I also think it is wrong. I just wanted to point out that changing it made the test pass, so at least the exception does work on ppc, but something else is going wrong when the original value is used. I do not consider this one a solution yet. -- Len Sorensen