[corlib] Fix a few NSLogWriter issues. (#13799)
[mono-project.git] / mcs / tests / test-801.cs
blob0c204848ec2f87a7b2152052230da81ce22ff0a3
1 using System;
3 class C
5 public enum E
7 V_0 = 10,
8 V_1 = 50,
9 V_2 = 80
12 public static implicit operator E (C x)
14 return E.V_2;
17 public static implicit operator int (C x)
19 return 1;
22 public static int Main ()
24 var v = new C ();
25 int i = E.V_1 - v;
26 if (i != -30)
27 return 1;
29 i = v - E.V_1;
30 if (i != 30)
31 return 10;
33 E e = E.V_1 + v;
34 if (e != (E) 51)
35 return 2;
37 e = v + E.V_0;
38 if (e != (E) 11)
39 return 3;
41 bool b = E.V_2 > v;
42 if (b)
43 return 4;
45 int iv = 900;
46 e = iv - E.V_1;
47 if (e != (E)850)
48 return 5;
50 i = v - E.V_1;
51 if (i != (int) 30)
52 return 6;
54 return 0;