Author: atsushi
Date: 2006-05-18 13:27:50 -0400 (Thu, 18 May 2006)
New Revision: 60829
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/ComboBoxTests.cs
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListBoxTest.cs
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RichTextBoxTest.cs
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ScrollBarTest.cs
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TabControlTest.cs
Log:
2006-05-18 Atsushi Enomoto <[EMAIL PROTECTED]>
Some compat fixes found by make run-test-ondotnet:
* ListBoxTest.cs : they don't throw exceptions.
* RichTextBoxTest.cs,
ScrollBarTest.cs,
ComboBoxTest.cs,
ComboBoxTests.cs : Commented some lines out since they are
environment (especially desktop theme) dependent.
TabControlTest.cs : SetSelectedIndex() was my bad that the test
needed the tab control be drawn to pass the test.
Some tests are env. dependent (as well as others).
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2006-05-18 15:37:36 UTC (rev 60828)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2006-05-18 17:27:50 UTC (rev 60829)
@@ -1,3 +1,16 @@
+2006-05-18 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ Some compat fixes found by make run-test-ondotnet:
+ * ListBoxTest.cs : they don't throw exceptions.
+ * RichTextBoxTest.cs,
+ ScrollBarTest.cs,
+ ComboBoxTest.cs,
+ ComboBoxTests.cs : Commented some lines out since they are
+ environment (especially desktop theme) dependent.
+ TabControlTest.cs : SetSelectedIndex() was my bad that the test
+ needed the tab control be drawn to pass the test.
+ Some tests are env. dependent (as well as others).
+
2006-05-16 Miguel de Icaza <[EMAIL PROTECTED]>
* DataGridTest.cs: Add a test case based on 78420, confirm that
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
2006-05-18 15:37:36 UTC (rev 60828)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs
2006-05-18 17:27:50 UTC (rev 60829)
@@ -53,7 +53,8 @@
//Assert.AreEqual (15, mycmbbox.ItemHeight, "#7");
// Note: Item height depends on the current font.
Assert.AreEqual (8, mycmbbox.MaxDropDownItems, "#8");
Assert.AreEqual (0, mycmbbox.MaxLength, "#9");
- Assert.AreEqual (20, mycmbbox.PreferredHeight, "#10");
+ //Assert.AreEqual (20, mycmbbox.PreferredHeight, "#10");
+// Note: Item height depends on the current font.
Assert.AreEqual (-1, mycmbbox.SelectedIndex, "#11");
Assert.AreEqual (null, mycmbbox.SelectedItem, "#12");
Assert.AreEqual ("", mycmbbox.SelectedText, "#13");
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ComboBoxTests.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ComboBoxTests.cs
2006-05-18 15:37:36 UTC (rev 60828)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ComboBoxTests.cs
2006-05-18 17:27:50 UTC (rev 60829)
@@ -66,7 +66,8 @@
Assert.AreEqual(-1, comboBox.SelectedIndex);
Assert.IsNull(comboBox.SelectedItem);
Assert.AreEqual(121, comboBox.Size.Width);
- Assert.AreEqual(20, comboBox.Size.Height);
+ //Note: it is environment dependent
+ //Assert.AreEqual(20, comboBox.Size.Height);
Assert.IsFalse(textChanged);
Assert.IsFalse(layoutUpdated);
}
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListBoxTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListBoxTest.cs
2006-05-18 15:37:36 UTC (rev 60828)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListBoxTest.cs
2006-05-18 17:27:50 UTC (rev 60829)
@@ -250,13 +250,13 @@
listBox.SelectionMode = (SelectionMode) 10;
}
- [Test][ExpectedException(typeof(InvalidOperationException))]
+ [Test]
public void SelectedValueNull()
{
listBox.SelectedValue = null;
}
- [Test][ExpectedException(typeof(InvalidOperationException))]
+ [Test]
public void SelectedValueEmptyString()
{
listBox.SelectedValue = String.Empty;
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RichTextBoxTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RichTextBoxTest.cs
2006-05-18 15:37:36 UTC (rev 60828)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RichTextBoxTest.cs
2006-05-18 17:27:50 UTC (rev 60829)
@@ -174,6 +174,7 @@
}
[Test]
+ [Ignore ("this test depends on system default font")]
public void GetCharFromPositionTest ()
{
Form myForm = new Form ();
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ScrollBarTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ScrollBarTest.cs
2006-05-18 15:37:36 UTC (rev 60828)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ScrollBarTest.cs
2006-05-18 17:27:50 UTC (rev 60829)
@@ -288,7 +288,7 @@
Assert.AreEqual (16, myscrlbar.BackgroundImage.Height,
"B3");
// F
- Assert.AreEqual ("ff000000", myscrlbar.ForeColor.Name,
"F1");
+ Assert.AreEqual ("ControlText",
myscrlbar.ForeColor.Name, "F1");
// I
//Assert.AreEqual (ImeMode.Disable, myscrlbar.ImeMode,
"I1");
@@ -444,6 +444,7 @@
myform.Visible = true;
ScrollBar myHscrlbar = new HScrollBar ();
myform.Controls.Add (myHscrlbar);
+ myHscrlbar.Font = new Font (FontFamily.GenericMonospace,
10);
myHscrlbar.FontChanged += new EventHandler
(ScrollBar_EventHandler);
FontDialog myFontDialog = new FontDialog();
myHscrlbar.Font = myFontDialog.Font;
@@ -601,7 +602,8 @@
MyHScrollBar msbar = new MyHScrollBar ();
Assert.AreEqual (80, msbar.MyDefaultSize.Width, "D1");
- Assert.AreEqual (21, msbar.MyDefaultSize.Height, "D2");
+ // this is environment dependent.
+ //Assert.AreEqual (21, msbar.MyDefaultSize.Height, "D2");
}
}
@@ -637,7 +639,8 @@
{
MyVScrollBar msbar = new MyVScrollBar ();
- Assert.AreEqual (21, msbar.MyDefaultSize.Width, "D3");
+ // This is environment dependent.
+ //Assert.AreEqual (21, msbar.MyDefaultSize.Width, "D3");
Assert.AreEqual (80, msbar.MyDefaultSize.Height, "D4");
}
}
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TabControlTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TabControlTest.cs
2006-05-18 15:37:36 UTC (rev 60828)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TabControlTest.cs
2006-05-18 17:27:50 UTC (rev 60829)
@@ -40,7 +40,8 @@
// I
Assert.AreEqual (null, myTabControl.ImageList, "#I1");
- Assert.AreEqual (18, myTabControl.ItemSize.Height, "#I2");
+ // It is environment dependent
+ //Assert.AreEqual (18, myTabControl.ItemSize.Height, "#I2");
Assert.AreEqual (0, myTabControl.ItemSize.Width, "#I3");
// M
@@ -76,7 +77,8 @@
Assert.AreEqual (2, myTabRect.X, "#GetT1");
Assert.AreEqual (2, myTabRect.Y, "#GetT2");
Assert.AreEqual (42, myTabRect.Width, "#GetT3");
- Assert.AreEqual (18, myTabRect.Height, "#GetT4");
+ // It is environment dependent
+ //Assert.AreEqual (18, myTabRect.Height, "#GetT4");
}
[Test]
@@ -125,6 +127,9 @@
c.TabPages.Add (new TabPage ());
c.TabPages.Add (new TabPage ());
Assert.AreEqual (0, c.SelectedIndex, "#1");
+ Form f = new Form ();
+ f.Controls.Add (c);
+ f.Show ();
c.SelectedIndex = 2; // beyond the pages - ignored
Assert.AreEqual (0, c.SelectedIndex, "#2");
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches