Author: rolf
Date: 2007-01-25 07:41:01 -0500 (Thu, 25 Jan 2007)
New Revision: 71662
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MdiFormTest.cs
Log:
2007-01-25 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
* ComboBoxTest.cs: Add tests for new properties.
* MdiFormTest.cs: Set ShowInTaskbar = false for main forms.
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2007-01-25 11:26:04 UTC (rev 71661)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2007-01-25 12:41:01 UTC (rev 71662)
@@ -1,3 +1,8 @@
+2007-01-25 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+
+ * ComboBoxTest.cs: Add tests for new properties.
+ * MdiFormTest.cs: Set ShowInTaskbar = false for main forms.
+
2007-01-24 Gert Driesen <[EMAIL PROTECTED]>
* FormTest.cs: Added NotWorking test for bug #80604.
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs
2007-01-25 11:26:04 UTC (rev 71661)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs
2007-01-25 12:41:01 UTC (rev 71662)
@@ -68,10 +68,99 @@
mycmbbox.AutoCompleteCustomSource = null;
Assert.AreEqual (true,
mycmbbox.AutoCompleteCustomSource != null, "#21");
+
+ Assert.AreEqual (ImageLayout.Tile,
mycmbbox.BackgroundImageLayout, "#22");
+ Assert.AreEqual (null, mycmbbox.DataSource, "#23");
+ Assert.AreEqual (106, mycmbbox.DropDownHeight, "#24");
+ Assert.AreEqual (FlatStyle.Standard,
mycmbbox.FlatStyle, "#25");
+ Assert.AreEqual ("{Width=0, Height=0}",
mycmbbox.MaximumSize.ToString (), "#26");
+ Assert.AreEqual ("{Width=0, Height=0}",
mycmbbox.MinimumSize.ToString (), "#27");
+ Assert.AreEqual ("{Left=0,Top=0,Right=0,Bottom=0}",
mycmbbox.Padding.ToString (), "#28");
+
#endif
}
+#if NET_2_0
[Test]
+ public void BackgroundImageLayoutTest ()
+ {
+ ComboBox cmbbox = new ComboBox ();
+ cmbbox.BackgroundImageLayout = ImageLayout.Stretch;
+ Assert.AreEqual (ImageLayout.Stretch,
cmbbox.BackgroundImageLayout, "#01");
+ }
+
+ [Test]
+ public void DropDownHeightTest ()
+ {
+ ComboBox cmbbox = new ComboBox ();
+ cmbbox.DropDownHeight = 225;
+ Assert.AreEqual (225, cmbbox.DropDownHeight, "#01");
+ cmbbox.DropDownHeight = 1;
+ Assert.AreEqual (1, cmbbox.DropDownHeight, "#02");
+ }
+
+ [Test]
+ [ExpectedException (typeof (ArgumentOutOfRangeException))]
+ public void DropDownHeightExceptionTest1 ()
+ {
+ ComboBox cmbbox = new ComboBox ();
+ cmbbox.DropDownHeight = -225;
+ }
+
+ [Test]
+ [ExpectedException (typeof (ArgumentOutOfRangeException))]
+ public void DropDownHeightExceptionTest2 ()
+ {
+ ComboBox cmbbox = new ComboBox ();
+ cmbbox.DropDownHeight = 0;
+ }
+
+ [Test]
+ public void FlatStyleTest ()
+ {
+ ComboBox cmbbox = new ComboBox ();
+ cmbbox.FlatStyle = FlatStyle.Popup;
+ Assert.AreEqual (FlatStyle.Popup, cmbbox.FlatStyle,
"#01");
+ }
+
+ [Test]
+ [ExpectedException (typeof (InvalidEnumArgumentException))]
+ public void FlatStyleExceptionTest ()
+ {
+ ComboBox cmbbox = new ComboBox ();
+ cmbbox.FlatStyle = (FlatStyle) (-123);
+ }
+
+ [Test]
+ public void MaximumSizeTest ()
+ {
+ ComboBox cmbbox = new ComboBox ();
+ cmbbox.MaximumSize = new Size (25, 25);
+ Assert.AreEqual ("{Width=25, Height=0}",
cmbbox.MaximumSize.ToString (), "#01");
+ cmbbox.MaximumSize = new Size (50, 75);
+ Assert.AreEqual ("{Width=50, Height=0}",
cmbbox.MaximumSize.ToString (), "#02");
+ }
+
+ [Test]
+ public void MinumumSizeTest ()
+ {
+ ComboBox cmbbox = new ComboBox ();
+ cmbbox.MinimumSize = new Size (25, 25);
+ Assert.AreEqual ("{Width=25, Height=0}",
cmbbox.MinimumSize.ToString (), "#1");
+ cmbbox.MinimumSize = new Size (50, 75);
+ Assert.AreEqual ("{Width=50, Height=0}",
cmbbox.MinimumSize.ToString (), "#2");
+ }
+
+ [Test]
+ public void PaddingTest ()
+ {
+ ComboBox cmbbox = new ComboBox ();
+ cmbbox.Padding = new Padding (21);
+ Assert.AreEqual ("{Left=21,Top=21,Right=21,Bottom=21}",
cmbbox.Padding.ToString (), "#01");
+ }
+#endif
+
+ [Test]
public void BeginEndUpdateTest ()
{
Form myform = new Form ();
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MdiFormTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MdiFormTest.cs
2007-01-25 11:26:04 UTC (rev 71661)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MdiFormTest.cs
2007-01-25 12:41:01 UTC (rev 71662)
@@ -46,8 +46,8 @@
public void SetUp (bool only_create, bool only_text)
{
SetUp (only_create, only_text, false);
- }
-
+ }
+
// No attribute here since this is supposed to be called from
// each test directly, not by nunit.
public void SetUp (bool only_create, bool only_text, bool
set_parent)
@@ -63,6 +63,7 @@
return;
main.Text = main.Name = "main";
+ main.ShowInTaskbar = false;
child1.Text = child1.Name = "child1";
child2.Text = child2.Name = "child2";
child3.Text = child3.Name = "child3";
@@ -985,12 +986,14 @@
child1 = new Form ();
child1.Name = "child1";
+ child1.Text = "child1";
child1.MdiParent = main;
child1.WindowState = FormWindowState.Maximized;
child1.Show ();
child2 = new Form ();
child2.Name = "child2";
+ child2.Text = "child2";
child2.MdiParent = main;
child2.Show();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches