[xbuild] Vbc task - make error column check a little non-specific.
[mono.git] / mcs / tests / test-154.cs
index 3ed47d9377d0d4f4489f05062c1f1203a7cb9189..8098cfd5bcabaa322a1a92d3491e5722859ee6c7 100644 (file)
@@ -294,7 +294,7 @@ public class X
                 } finally {
                         fin = 1;
                 }
-                return res;
+                return fin;
         }
 
        // from bug #30487.
@@ -500,4 +500,98 @@ public class X
                 if (i == 0)
                         return 0;
         }
+
+       //
+       // Bug 48962
+       //
+       public void test34 ()
+       {
+               int y, x = 3;
+               if (x > 3) {
+                       y = 3;
+                       goto end;
+               }
+               return;
+        end:
+               x = y;
+       }
+
+       //
+       // Bug 46640
+       //
+       public static void test35 (int a, bool test)
+       {
+               switch (a) {
+               case 3:
+                       if (test)
+                               break;
+                       return;
+               default:
+                       return;
+               }
+       }
+
+       //
+       // Bug 52625
+       //
+       public static void test36 ()
+       {
+               string myVar;
+               int counter = 0;
+
+               while (true)
+               {
+                       if (counter < 3)
+                               counter++;
+                       else {
+                               myVar = "assigned";
+                               break;
+                       }
+               }
+               Console.WriteLine (myVar);
+       }
+
+       //
+       // Bug 58322
+       //
+       public static void test37 ()
+       {
+               int x = 0;
+               int y = 0;
+               switch (x) {
+               case 0:
+                       switch (y) {
+                       case 0:
+                               goto k_0;
+                       default:
+                               throw new Exception ();
+                       }
+               }
+
+       k_0:
+               ;
+       }
+
+       //
+       // Bug 59429
+       //
+       public static int test38 ()
+       {
+               return 0;
+       foo:
+               ;
+       }
+
+       static int test40 (int stop)
+       {
+               int service;
+
+               int pos = 0;
+               do {
+                       service = 1;
+                       break;
+               } while (pos < stop);
+
+               return service;
+       }
 }