Merge pull request #487 from mayerwin/patch-1
[mono.git] / mcs / tests / test-678.cs
1 using System;
2
3 public class NaNTest
4 {
5         public NaNTest (double width, double height)
6         {
7                 if (width < 0 || height < 0)
8                         throw new ArgumentException ("fails");
9                 
10                 if (width <= 0 || height <= 0)
11                         throw new ArgumentException ("fails 2");
12                 
13                 if (width > 0 || height > 0)
14                         throw new ArgumentException ("fails 3");
15                 
16                 if (width >= 0 || height >= 0)
17                         throw new ArgumentException ("fails 4");
18         }
19
20         public static int Main ()
21         {
22                 if (Double.NaN < 0 || Double.NaN < 0)
23                         throw new ArgumentException ("passes");
24
25                 new NaNTest (Double.NaN, Double.NaN);
26                 
27                 return 0;
28         } 
29 }