2005-08-08 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mono / tests / thread6.cs
index 24f02118a1cc6dce43199d795d0cdceb5f7f3b2d..f7910b2c9ba2ca36335a221f780dbf0b18d0bfc3 100644 (file)
@@ -25,6 +25,10 @@ public class MultiThreadExceptionTest {
                                                // Check that the exception is only rethrown in
                                                // the appropriate catch clauses
 
+                                               // This doesn't work currently, see
+                                               // http://bugzilla.ximian.com/show_bug.cgi?id=68552
+
+                                               /*
                                                try {
                                                }
                                                catch {}
@@ -33,6 +37,7 @@ public class MultiThreadExceptionTest {
                                                }
                                                catch (Exception) {
                                                }
+                                               */
                                                result |= 32;
 
                                                // Check that the exception is properly rethrown
@@ -101,7 +106,29 @@ public class MultiThreadExceptionTest {
                if (result != 59)
                        return 1;
 
+               // Test from #68552
+               try {
+                       try {
+                               Run ();
+                       } catch (Exception ex) {
+                       }
+
+                       return 2;
+               }
+               catch (ThreadAbortException ex) {
+                       Thread.ResetAbort ();
+               }
+
                return 0;
        }
+
+       public static void Run ()
+       {
+               try {
+                       Thread.CurrentThread.Abort ();
+               } catch (Exception ex) {
+                       throw new Exception ("other");
+               }
+       }
 }