2010-06-03 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / gtest-335.cs
blob71654fc20c9b1332c1d65d7c8c7e25eeed85c289
1 using System;
3 public class TestClass
5 public static bool Test_1 ()
7 DayOfWeek? testEnum = DayOfWeek.Monday;
8 switch (testEnum) {
9 case DayOfWeek.Monday:
10 return true;
12 return false;
15 public static bool Test_2 ()
17 DayOfWeek? testEnum = null;
18 switch (testEnum) {
19 case DayOfWeek.Monday:
20 return false;
21 case null:
22 return true;
23 default:
24 return false;
28 public static bool Test_3 ()
30 DayOfWeek? testEnum = null;
31 switch (testEnum) {
32 case DayOfWeek.Monday:
33 return false;
34 default:
35 return true;
39 public static bool Test_4 ()
41 DayOfWeek? testEnum = DayOfWeek.Monday;
42 switch (testEnum) {
44 return true;
47 public static int Main()
49 if (!Test_1 ())
50 return 1;
51 if (!Test_2 ())
52 return 2;
53 if (!Test_3 ())
54 return 3;
55 if (!Test_4 ())
56 return 4;
58 Console.WriteLine ("OK");
59 return 0;