Author: jackson
Date: 2006-12-06 14:01:24 -0500 (Wed, 06 Dec 2006)
New Revision: 69129
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TextBoxTest.cs
Log:
* TextBoxTest.cs: Add a test for Modified property.
- We need to put something on the clipboard before we can paste.
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2006-12-06 18:36:53 UTC (rev 69128)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2006-12-06 19:01:24 UTC (rev 69129)
@@ -1,3 +1,8 @@
+2006-12-06 Jackson Harper <[EMAIL PROTECTED]>
+
+ * TextBoxTest.cs: Add a test for Modified property.
+ - We need to put something on the clipboard before we can paste.
+
2006-12-04 Jackson Harper <[EMAIL PROTECTED]>
* TextBoxTest: More of these tests work now.
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TextBoxTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TextBoxTest.cs
2006-12-06 18:36:53 UTC (rev 69128)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TextBoxTest.cs
2006-12-06 19:01:24 UTC (rev 69129)
@@ -45,10 +45,14 @@
Assert.AreEqual (BorderStyle.Fixed3D,
textBox.BorderStyle, "#5");
Assert.AreEqual (false, textBox.CanUndo, "#6a");
+
+ Clipboard.SetDataObject ("TEST");
textBox.Paste ();
Assert.AreEqual (true, textBox.CanUndo, "#6b");
+ textBox.Undo ();
textBox.ClearUndo ();
Assert.AreEqual (false, textBox.CanUndo, "#6c");
+
Assert.AreEqual ("WindowText", textBox.ForeColor.Name,
"#7");
Assert.AreEqual (true, textBox.HideSelection, "#8");
Assert.AreEqual (1, textBox.Lines.Length, "#9");
@@ -326,5 +330,21 @@
Assert.AreEqual (text, textBox.Text, "#2");
}
+
+
+ [Test]
+ public void ModifiedTest ()
+ {
+ Assert.AreEqual (true, textBox.Modified, "modified-1");
+
+ textBox.Modified = false;
+ Assert.AreEqual (false, textBox.Modified, "modified-2");
+
+ textBox.Modified = true;
+ Assert.AreEqual (true, textBox.Modified, "modified-2");
+
+ textBox.Text = "TEXT";
+ Assert.AreEqual (false, textBox.Modified, "modified-3");
+ }
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches