Merge pull request #4816 from BrzVlad/fix-remoting-exception
[mono.git] / mcs / tests / test-579.cs
index 9df2a493acda4d8ed41f70d56e5428c542011269..1f49f63c7650ecb05e0d0e870d1ac32d6b1ffd08 100644 (file)
@@ -3,6 +3,17 @@
 public class TestCase
 {
        public static int Main ()
+       {
+               if (Test1 () != 0)
+                       return 1;
+
+               if (Test2 () != 0)
+                       return 2;
+
+               return 0;
+       }
+
+       static int Test1 ()
        {
                int i = 0;
                {
@@ -21,4 +32,46 @@ public class TestCase
                        
                return 0;
        }
+
+       static int Test2 ()
+       {
+               int i = 0;
+
+               while (true) {
+                       {
+                               goto A;
+                               A:
+                                       i += 3;
+                               break;
+                       }
+               }
+
+               if (i != 3)
+                       return 1;
+
+               return 0;
+       }
+
+       static int Test3 ()
+       {
+               int i = 0;
+
+               do {
+                       {
+                               goto A;
+                               A:
+                                       i += 3;
+                               goto X;
+                               X:
+                               break;
+                       }
+#pragma warning disable 162, 429
+               } while (i > 0);
+#pragma warning restore 162, 429
+               
+               if (i != 3)
+                       return 1;
+
+               return 0;
+       }
 }