diff options
author | Marek Safar <marek.safar@gmail.com> | 2008-09-09 14:11:20 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2008-09-09 14:11:20 +0400 |
commit | 435be9842cf1a108bb6346b266055bc53e2aab35 (patch) | |
tree | 63445e26308a558acb37b8b1e6c509bf328c033f /mcs/tests/test-678.cs | |
parent | c01417cda21e565674bd8d1ed6ae5f4e52934967 (diff) |
2008-09-09 Marek Safar <marek.safar@gmail.com>
A test for bug #423981
svn path=/trunk/mcs/; revision=112573
Diffstat (limited to 'mcs/tests/test-678.cs')
-rwxr-xr-x | mcs/tests/test-678.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mcs/tests/test-678.cs b/mcs/tests/test-678.cs new file mode 100755 index 00000000000..cbb5bb7a022 --- /dev/null +++ b/mcs/tests/test-678.cs @@ -0,0 +1,29 @@ +using System; + +public class NaNTest +{ + public NaNTest (double width, double height) + { + if (width < 0 || height < 0) + throw new ArgumentException ("fails"); + + if (width <= 0 || height <= 0) + throw new ArgumentException ("fails 2"); + + if (width > 0 || height > 0) + throw new ArgumentException ("fails 3"); + + if (width >= 0 || height >= 0) + throw new ArgumentException ("fails 4"); + } + + static int Main () + { + if (Double.NaN < 0 || Double.NaN < 0) + throw new ArgumentException ("passes"); + + new NaNTest (Double.NaN, Double.NaN); + + return 0; + } +} |