Author: marek
Date: 2007-06-12 15:13:42 -0400 (Tue, 12 Jun 2007)
New Revision: 79329
Added:
trunk/mcs/tests/gtest-335.cs
Log:
New test inspired by #81807
Added: trunk/mcs/tests/gtest-335.cs
===================================================================
--- trunk/mcs/tests/gtest-335.cs 2007-06-12 19:12:46 UTC (rev 79328)
+++ trunk/mcs/tests/gtest-335.cs 2007-06-12 19:13:42 UTC (rev 79329)
@@ -0,0 +1,61 @@
+using System;
+
+public class TestClass
+{
+ public static bool Test_1 ()
+ {
+ DayOfWeek? testEnum = DayOfWeek.Monday;
+ switch (testEnum) {
+ case DayOfWeek.Monday:
+ return true;
+ }
+ return false;
+ }
+
+ public static bool Test_2 ()
+ {
+ DayOfWeek? testEnum = null;
+ switch (testEnum) {
+ case DayOfWeek.Monday:
+ return false;
+ case null:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ public static bool Test_3 ()
+ {
+ DayOfWeek? testEnum = null;
+ switch (testEnum) {
+ case DayOfWeek.Monday:
+ return false;
+ default:
+ return true;
+ }
+ }
+
+ public static bool Test_4 ()
+ {
+ DayOfWeek? testEnum = DayOfWeek.Monday;
+ switch (testEnum) {
+ }
+ return true;
+ }
+
+ public static int Main()
+ {
+ if (!Test_1 ())
+ return 1;
+ if (!Test_2 ())
+ return 2;
+ if (!Test_3 ())
+ return 3;
+ if (!Test_4 ())
+ return 4;
+
+ Console.WriteLine ("OK");
+ return 0;
+ }
+}
\ No newline at end of file
Property changes on: trunk/mcs/tests/gtest-335.cs
___________________________________________________________________
Name: svn:eol-style
+ native
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches