2004-02-05 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / tests / test-18.cs
index efa05510a15a1c13cf888a81260e6ba91cda0725..eb2a02c003327bea4500efd4d29c4b73d3847c00 100644 (file)
@@ -20,6 +20,18 @@ class X {
                }
        }
 
+       static int ret (int a)
+       {
+               try {
+                       if (a == 1)
+                               throw new Exception ();
+                       
+                       return 1;
+               } catch {
+                       return 2;
+               }
+       }
+       
        static int Main ()
        {
                m ();
@@ -28,6 +40,13 @@ class X {
                if (j != 1)
                        return 2;
 
+               if (ret (1) != 2)
+                       return 3;
+
+               if (ret (10) != 1)
+                       return 4;
+               
                return 0;
        }
 }
+