Author: toshok
Date: 2006-11-04 12:22:05 -0500 (Sat, 04 Nov 2006)
New Revision: 67359

Modified:
   trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormTest.cs
Log:
2006-11-04  Chris Toshok  <[EMAIL PROTECTED]>

        * FormTest.cs: add a test to more accurately test for bug #79155
        (make sure an ObjectDisposedException is thrown if you Show() a
        Form you just Close()'d).



Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2006-11-04 17:07:22 UTC (rev 67358)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2006-11-04 17:22:05 UTC (rev 67359)
@@ -1,3 +1,9 @@
+2006-11-04  Chris Toshok  <[EMAIL PROTECTED]>
+
+       * FormTest.cs: add a test to more accurately test for bug #79155
+       (make sure an ObjectDisposedException is thrown if you Show() a
+       Form you just Close()'d).
+
 2006-11-04  Gert Driesen  <[EMAIL PROTECTED]>
 
        * ComboBoxTests.cs: Moved to correct namespace. Added test for bug

Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormTest.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormTest.cs 
2006-11-04 17:07:22 UTC (rev 67358)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormTest.cs 
2006-11-04 17:22:05 UTC (rev 67359)
@@ -217,5 +217,16 @@
                        Assert.IsFalse (myform.Visible, "A9");
                        Assert.IsFalse (myform.IsDisposed, "A10");
                }
+
+               [Test]
+               [ExpectedException (typeof (ObjectDisposedException))]
+               public void AccessDisposedForm ()
+               {
+                       Form myform = new Form ();
+                       myform.ShowInTaskbar = false;
+
+                       myform.Close (); // this should result in the form 
being disposed
+                       myform.Show (); // and this line should result in the 
ODE being thrown
+               }
        }
 }

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

Reply via email to