Author: gert
Date: 2007-05-10 15:25:28 -0400 (Thu, 10 May 2007)
New Revision: 77155

Added:
   trunk/gert/standalone/bug80798/
   trunk/gert/standalone/bug80798/test.cs
   trunk/gert/standalone/bug81587/
   trunk/gert/standalone/bug81587/test.cs
Log:
Added tests for bug #80798 and #81587.


Added: trunk/gert/standalone/bug80798/test.cs
===================================================================
--- trunk/gert/standalone/bug80798/test.cs      2007-05-10 19:11:06 UTC (rev 
77154)
+++ trunk/gert/standalone/bug80798/test.cs      2007-05-10 19:25:28 UTC (rev 
77155)
@@ -0,0 +1,29 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Threading;
+
+public class MultiThreadExceptionTest
+{
+       [DllImport ("ole32.dll")]
+       static extern int CoInitialize (IntPtr pvReserved);
+
+       static void MyThreadStart ()
+       {
+               CoInitialize (IntPtr.Zero);
+#if MONO || !NET_2_0
+               throw new Exception ();
+#endif
+       }
+
+       public static void Main ()
+       {
+               Thread t1 = new Thread (new ThreadStart
+                       (MultiThreadExceptionTest.MyThreadStart));
+               t1.IsBackground = true;
+               Thread t2 = new Thread (new ThreadStart
+                       (MultiThreadExceptionTest.MyThreadStart));
+               t1.IsBackground = true;
+               t1.Start ();
+               t2.Start ();
+       }
+}

Added: trunk/gert/standalone/bug81587/test.cs
===================================================================
--- trunk/gert/standalone/bug81587/test.cs      2007-05-10 19:11:06 UTC (rev 
77154)
+++ trunk/gert/standalone/bug81587/test.cs      2007-05-10 19:25:28 UTC (rev 
77155)
@@ -0,0 +1,16 @@
+using System;
+using System.Threading;
+
+class Program
+{
+       static void MyThreadStart ()
+       {
+               throw new Exception ();
+       }
+
+       static void Main ()
+       {
+               Thread t = new Thread (new ThreadStart (MyThreadStart));
+               t.Start ();
+       }
+}

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to