Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / test-369.cs
1 class Test {
2         static int count;
3
4         static public bool operator == (Test x, Test y)
5         {
6                 ++count;
7                 return false;
8         }
9
10         static public bool operator != (Test x, Test y) { return true; }
11         
12         public override bool Equals (object o) { return false; }
13
14         public override int GetHashCode () { return 0; }
15
16         public static void Main ()
17         {
18                 Test y = new Test ();
19                 if (y == null)
20                         throw new System.Exception ();
21                 if (count != 1)
22                         throw new System.Exception ("Operator == was not called");
23         }
24 }