[amd64] Make inline function in header static
[mono-project.git] / mcs / tests / gtest-335.cs
blobe8632fff0a84c48e3e933508ca50752db573e9ba
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 bool Test_5 ()
49 DayOfWeek? testEnum = DayOfWeek.Wednesday;
50 switch (testEnum) {
51 case DayOfWeek.Monday:
52 return false;
53 case DayOfWeek.Wednesday:
54 goto case null;
55 case null:
56 return true;
57 default:
58 return false;
62 static int Test_6 ()
64 switch ((int?)null){
65 case 1:
66 break;
67 case null:
68 return 1;
69 default:
70 return 3;
72 return 2;
75 public static int Main()
77 if (!Test_1 ())
78 return 1;
79 if (!Test_2 ())
80 return 2;
81 if (!Test_3 ())
82 return 3;
83 if (!Test_4 ())
84 return 4;
85 if (!Test_5 ())
86 return 5;
87 if (Test_6 () != 1)
88 return 6;
90 Console.WriteLine ("OK");
91 return 0;