Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / tests / test-154.cs
index 0a1550ca7669a62c8c694bb3b53a764ae4c15045..163e78d135caac1dba6b75fb7836b8a5b3886bde 100644 (file)
@@ -530,4 +530,112 @@ public class X
                        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;
+       }
+
+       public void test41 ()
+       {
+               int y, x = 3;
+               int z;
+               while (true) {
+                       if (x > 3) {
+                               y = 3;
+                               goto end;
+                       } else {
+                               z = 3;
+                       }
+
+                       break;
+               end:
+                       z = y;
+               }
+
+               Console.WriteLine (z);
+       }
+       
+       public void test42 (int arg)
+       {
+               bool x;
+               for (; ; ) {
+                       x = false;
+                       if (arg > 0) {
+                               x = true;
+                               switch (arg) {
+                               case 1:
+                               case 2:
+                                       continue;
+                               default:
+                                       break;
+                               }
+                               break;
+                       } else {
+                               x = false;
+                               break;
+                       }
+               }
+
+               Console.WriteLine (x);
+       }
 }