Author: pbartok
Date: 2006-07-06 23:45:15 -0400 (Thu, 06 Jul 2006)
New Revision: 62337
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlStyleTest.cs
Log:
2006-07-06 Peter Dennis Bartok <[EMAIL PROTECTED]>
* ControlTest.cs: Added "LinkLabel with link" test
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2006-07-07 03:23:08 UTC (rev 62336)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2006-07-07 03:45:15 UTC (rev 62337)
@@ -1,3 +1,7 @@
+2006-07-06 Peter Dennis Bartok <[EMAIL PROTECTED]>
+
+ * ControlTest.cs: Added "LinkLabel with link" test
+
2006-06-30 Chris Toshok <[EMAIL PROTECTED]>
* DataGridTableStyleTest.cs: add a bunch of mirrored tests for the
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlStyleTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlStyleTest.cs
2006-07-07 03:23:08 UTC (rev 62336)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlStyleTest.cs
2006-07-07 03:45:15 UTC (rev 62337)
@@ -19,6 +19,17 @@
static Array style_values =
Enum.GetValues(typeof(ControlStyles));
static string[] style_names =
Enum.GetNames(typeof(ControlStyles));
+ public void AssertAreEqual(string[] want, string[] got, string
name) {
+ if (want.Length == got.Length) {
+ for (int i=0; i < want.Length; i++) {
+ if (want[i] != got[i]) {
+ Console.WriteLine("{0}:
Expected {1}, got {2}", name, want[i], got[i]);
+ }
+ }
+ }
+ Assert.AreEqual(want, got, name);
+ }
+
public static string[] GetStyles(Control control) {
string[] result;
@@ -252,7 +263,33 @@
"DoubleBuffer=True"
};
+ string[] LinkLabel_link_want = {
+ "ContainerControl=False",
+ "UserPaint=True",
+ "Opaque=True",
+ "ResizeRedraw=True",
+ "FixedWidth=False",
+ "FixedHeight=False",
+ "StandardClick=True",
+ "Selectable=True",
+ "UserMouse=False",
+ "SupportsTransparentBackColor=True",
+ "StandardDoubleClick=True",
+ "AllPaintingInWmPaint=True",
+ "CacheText=False",
+ "EnableNotifyMessage=False",
+ "DoubleBuffer=True"
+ };
+
+
Assert.AreEqual(LinkLabel_want, GetStyles(new
LinkLabel()), "LinkLabelStyles");
+
+ // Test LinkLabel with a link
+ LinkLabel link = new LinkLabel();
+ link.Text = "Users need not fear making the switch to
Linux";
+ link.Links.Add (6,9, "http://link1");
+ Assert.AreEqual(LinkLabel_link_want, GetStyles(link),
"LinkLabelStyles2");
+
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches