Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / gtest-407.cs
1 using System;
2
3 struct MyColor
4 {
5         int v;
6
7         public MyColor (int v)
8         {
9                 this.v = v;
10         }
11
12         public static bool operator == (MyColor left, MyColor right)
13         {
14                 return left.v == right.v;
15         }
16
17         public static bool operator != (MyColor left, MyColor right)
18         {
19                 return left.v != right.v;
20         }
21 }
22
23 public class NullableColorTests
24 {
25         public static int Main ()
26         {
27                 MyColor? col = null;
28                 bool b = col == new MyColor (3);
29                 Console.WriteLine (b);
30                 if (b)
31                         return 1;
32                         
33                 b = col != new MyColor (3);
34                 if (!b)
35                         return 2;
36                 
37                 return 0;
38         }
39 }