浏览代码

2007-09-11 Jonathan Pobst <[email protected]>

	* ControlTest.cs: Add test for bug #82748.

svn path=/trunk/mcs/; revision=85648
Jonathan Pobst 18 年之前
父节点
当前提交
349ae33a46

+ 4 - 0
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog

@@ -1,3 +1,7 @@
+2007-09-11  Jonathan Pobst  <[email protected]>
+
+	* ControlTest.cs: Add test for bug #82748.
+
 2007-09-11  Jonathan Pobst  <[email protected]>
 
 	* ScrollBarTest.cs: Add test demonstrating behavior when Maximum

+ 25 - 0
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlTest.cs

@@ -156,6 +156,31 @@ namespace MonoTests.System.Windows.Forms
 		}
 #endif
 		
+		[Test]
+		public void Bug82748 ()
+		{
+			Form f = new Form ();
+			f.ShowInTaskbar = false;
+			
+			Control c = new Control ();
+			c.Size = new Size (100, 100);
+			
+			Control c2 = new Control ();
+			c2.Size = c.Size;
+			c2.Controls.Add (c);
+			
+			c.Anchor = AnchorStyles.Right;
+			
+			f.Controls.Add (c);
+			
+			f.Show ();
+			
+			Assert.AreEqual (0, c.Left, "A1");
+			
+			f.Close ();
+			f.Dispose ();
+		}
+		
 		[Test]
 		public void InvokeTestParentHandle ()
 		{