From d88a033a4ea07aaafdca0c10a76b7d7a770be0e9 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Tue, 13 Apr 2010 21:38:17 +0000 Subject: [PATCH] 2010-04-13 Zoltan Varga * ConvertTest.cs: Add a test for #596339. svn path=/trunk/mcs/; revision=155334 --- mcs/class/corlib/Test/System/ChangeLog | 4 ++++ mcs/class/corlib/Test/System/ConvertTest.cs | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/mcs/class/corlib/Test/System/ChangeLog b/mcs/class/corlib/Test/System/ChangeLog index 01ce961d8b9..a51f837aea8 100644 --- a/mcs/class/corlib/Test/System/ChangeLog +++ b/mcs/class/corlib/Test/System/ChangeLog @@ -1,3 +1,7 @@ +2010-04-13 Zoltan Varga + + * ConvertTest.cs: Add a test for #596339. + 2010-04-12 Carlos Alberto Cortez * TimeSpanTest.cs: Remove "NotWorking" from our custom formats parse diff --git a/mcs/class/corlib/Test/System/ConvertTest.cs b/mcs/class/corlib/Test/System/ConvertTest.cs index 0598692b65b..7ba22472e9d 100644 --- a/mcs/class/corlib/Test/System/ConvertTest.cs +++ b/mcs/class/corlib/Test/System/ConvertTest.cs @@ -4688,6 +4688,13 @@ namespace MonoTests.System { { Convert.ChangeType ("this-is-a-string", typeof (Foo)); } + + [Test] + [ExpectedException (typeof (OverflowException))] + public void ToInt32_NaN () + { + Convert.ToInt32 (Double.NaN); + } } public class Image -- 2.25.1