Hey hey hey!

I ran ConvertTest again tonight and we're getting 4 failures:

        1) TestToInt64(MonoTests.System.ConvertTest) "#L25
        expected:<System.OverflowException> but
        was:<NUnit.Framework.AssertionFailedError>"

This is bug 25692. I don't know how to fix it.

        2) TestToDouble(MonoTests.System.ConvertTest) "Unexpected       exception at
iTest = 10: e = NUnit.Framework.AssertionFailedError
        #I10 expected:<1234.23449707031> but
        was:<1234>NUnit.Framework.AssertionFailedErrorin <0x00041>
        NUnit.Framework.Assertion:Fail (string)

This one is real funky. I got a test program attached. The output on
Linux is this:

        <duncan@diphthong: ~/ > mono double.exe
        float: 1234.23449707031
        double: 1234
        RESULT: 0

On Windows:

        <Duncan Mak@FRICATIVE: ~/ > ./double.exe 
        float: 1234.234
        double: 1234.23449707031

I think we should file a bug on this, but I dunno where.

        3) TestToDateTime(MonoTests.System.ConvertTest)

This is some System.Globalization, CultureInfo, DateTimeStyles related
bug. Punting it for now.

        4) TestChangeType(MonoTests.System.ConvertTest) "Unexpected     exception
at iTest = 15: e = System.IndexOutOfRangeException
        Array index is out of range
        System.IndexOutOfRangeException in <0x00029>    System.Convert:ChangeType
        (object,System.TypeCode,System.IFormatProvider)
        in <0x009f6> MonoTests.System.ConvertTest:TestChangeType ()

It's late, and I'm tired. But I have no fucking clue why we're getting
an IndexOutOfRangeException at all.

Sigh.

I fixed the bug at iTest = 13, MS allows ChangeType (null, null). I
played around a bit and found out they're throwing Exceptions they said
they won't throw (ie. NullReferenceException).

-- 
Duncan Mak <[EMAIL PROTECTED]>
using System;
class T {
        static void Main() {                
                float f = 1234.2345f;

                try { 
                        double d = Convert.ToDouble (f);
                        
                        Console.WriteLine ("float: " + f);
                        Console.WriteLine ("double: " + d);
                } catch (Exception e) {
                        Console.WriteLine (e.GetType ());
                }
        }
}

Reply via email to