(ArrayAccess.DoResolve): Array Access can operate on
[mono.git] / mcs / tests / test-49.cs
index ee004fac065e9f1df9378353f2c404ffbe17c08c..67f2c38807c94b6a544bbb2754c42b9c4fe2140d 100755 (executable)
@@ -368,6 +368,31 @@ class X {
                }
                return 4;
        }
+
+       static int test_def (string s)
+       {
+               switch (s){
+               case "one":
+                       goto default;
+               case "two":
+                       return 1;
+               case "three":
+                       return 2;
+               default:
+                       return 3;
+               }
+               return 4;
+       }
+
+       static int test_coverage (int x)
+       {
+               switch (x){
+               case 0:
+                       return 1;
+               default:
+                       return 10;
+               }
+       }
        
        static int Main ()
        {
@@ -437,6 +462,18 @@ class X {
                if (testp ("blah") != 4)
                        return 25;
 
+               if (test_def ("one") != 3)
+                       return 26;
+               if (test_def ("two") != 1)
+                       return 27;
+               if (test_def ("three") != 2)
+                       return 28;
+               if (test_def (null) != 3)
+                       return 29;
+
+               if (test_coverage (100) != 10)
+                       return 30;
+               
                Console.WriteLine ("All tests pass");
                return 0;
        }