Author: calberto
Date: 2007-12-15 20:04:53 -0500 (Sat, 15 Dec 2007)
New Revision: 91370
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewItemTest.cs
Log:
2007-12-15 Carlos Alberto Cortez <[EMAIL PROTECTED]>
* ListViewItemTest.cs: Added new Constructor_Group test, that I
forgot to add after fixing a 2.0 bug.
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2007-12-15 23:58:58 UTC (rev 91369)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2007-12-16 01:04:53 UTC (rev 91370)
@@ -1,3 +1,8 @@
+2007-12-15 Carlos Alberto Cortez <[EMAIL PROTECTED]>
+
+ * ListViewItemTest.cs: Added new Constructor_Group test, that I
+ forgot to add after fixing a 2.0 bug.
+
2007-12-14 Carlos Alberto Cortez <[EMAIL PROTECTED]>
* ListViewItemTest.cs: Contructor_Serializable test only applies for
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewItemTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewItemTest.cs
2007-12-15 23:58:58 UTC (rev 91369)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewItemTest.cs
2007-12-16 01:04:53 UTC (rev 91370)
@@ -251,10 +251,23 @@
Assert.IsNotNull (item.SubItems [1].Text, "#7");
Assert.AreEqual ("B", item.SubItems [1].Text, "#8");
}
-#endif
-#if NET_2_0
[Test]
+ public void Constructor_Groups ()
+ {
+ ListViewItem itemA = new ListViewItem ((ListViewGroup)
null);
+ Assert.AreEqual (null, itemA.Group, "#A1");
+
+ ListViewGroup group = new ListViewGroup ("Group A");
+ group.Items.Add (itemA);
+
+ ListViewItem itemB = new ListViewItem ("B", group);
+ Assert.AreEqual (group, itemB.Group, "#B1");
+ Assert.AreEqual (2, group.Items.Count, "#B2");
+ Assert.AreEqual (itemB, group.Items [1], "#B3");
+ }
+
+ [Test]
public void Constructor_Serializable ()
{
ListViewItem item = new ListViewItem ("A");
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches