[System.Windows.Forms] Disable failing test
[mono-project.git] / mcs / tests / test-99.cs
blob2f2b7ab2c9ecf6efbb09b6de7a858a561f65258f
1 //
2 // Tests the resulting value of operator + (U x, E y)
3 // as well as implicit conversions in the above operator.
4 //
5 using System;
6 class X {
7 enum A : int {
8 a = 1, b, c
11 enum Test : short {
12 A = 1,
16 public static int Main ()
18 int v = 1;
19 object foo = (v + A.a);
20 object foo2 = (1 + A.a);
22 if (foo.GetType ().ToString () != "X+A"){
23 Console.WriteLine ("Expression evaluator bug in E operator + (U x, E y)");
24 return 1;
27 if (foo2.GetType ().ToString () != "X+A"){
28 Console.WriteLine ("Constant folder bug in E operator + (U x, E y)");
29 return 2;
32 // Now try the implicit conversions for underlying types in enum operators
33 byte b = 1;
34 short s = (short) (Test.A + b);
36 const int e = A.b + 1 - A.a;
39 // Make sure that other operators still work
40 if (Test.A != Test.A)
41 return 3;
42 if (Test.A == Test.B)
43 return 4;
45 return 0;