Author: andreia
Date: 2008-02-18 17:33:49 -0500 (Mon, 18 Feb 2008)
New Revision: 96104

Modified:
   trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
   
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlTest.cs
Log:
* ControlTest.cs: New test to check if, when controls don't have 
a parent and are then reparented, their location is not changed.

2008-02-18  Andreia Gaita <[EMAIL PROTECTED]>

Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2008-02-18 21:47:06 UTC (rev 96103)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2008-02-18 22:33:49 UTC (rev 96104)
@@ -1,3 +1,12 @@
+2008-02-18  Andreia Gaita <[EMAIL PROTECTED]> 
+
+       
+
+2008-02-18  Andreia Gaita <[EMAIL PROTECTED]>
+
+       * ControlTest.cs: New test to check if, when controls don't have 
+       a parent and are then reparented, their location is not changed.
+
 2008-02-11  Carlos Alberto Cortez <[EMAIL PROTECTED]>
 
        * BindingTest.cs: New test for 2.0 DataSourceNullValue property -

Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlTest.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlTest.cs  
    2008-02-18 21:47:06 UTC (rev 96103)
+++ 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlTest.cs  
    2008-02-18 22:33:49 UTC (rev 96104)
@@ -1985,6 +1985,24 @@
                {
                        ((Control) sender).Tag = false;
                }
+               
+               [Test]
+               public void ControlReparentLocationTest ()
+               {
+                       Form form = new Form ();
+                       Label l = new Label ();
+                       l.Location = new Point (0, 0);
+                       form.Controls.Add (l);
+                       form.Show ();
+                       Assert.AreEqual (0, l.Left, "#A1");
+                       Assert.AreEqual (0, l.Top, "#A2");
+                       form.Hide ();
+                       form.Controls.Remove (l);
+                       form.Show ();
+                       form.Controls.Add (l);
+                       Assert.AreEqual (0, l.Left, "#A3");
+                       Assert.AreEqual (0, l.Top, "#A4");
+               }
 
 #if NET_2_0
                [Test]

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

Reply via email to