Author: spouliot
Date: 2006-09-22 20:23:00 -0400 (Fri, 22 Sep 2006)
New Revision: 65831

Modified:
   trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
   
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SystemInformationTest.cs
Log:
2006-09-22  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * SystemInformationTest.cs: Add tests case for MenuFont.



Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2006-09-23 00:22:13 UTC (rev 65830)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2006-09-23 00:23:00 UTC (rev 65831)
@@ -1,3 +1,7 @@
+2006-09-22  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * SystemInformationTest.cs: Add tests case for MenuFont.
+
 2006-09-18  Jonathan Pobst  <[EMAIL PROTECTED]>
        * EventArgsTest.cs: Add tests for ToolStrip*EventArgs.
 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SystemInformationTest.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SystemInformationTest.cs
    2006-09-23 00:22:13 UTC (rev 65830)
+++ 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SystemInformationTest.cs
    2006-09-23 00:23:00 UTC (rev 65831)
@@ -21,8 +21,8 @@
 //
 // Authors:
 //     Jackson Harper ([EMAIL PROTECTED])
+//     Sebastien Pouliot  <[EMAIL PROTECTED]>
 //
-//
 
 
 using System;
@@ -44,13 +44,30 @@
                        Assert.AreEqual (expected, SystemInformation.IconSize, 
"#1");
                }
 
+               [Test]
                public void IconSpacingTest ()
                {
                        Size expected = new Size (75, 75);
                        Assert.AreEqual (expected, 
SystemInformation.IconSpacingSize, "#1");
                }
+
+               [Test]
+               public void MenuFont_Clone ()
+               {
+                       Font mf1 = SystemInformation.MenuFont;
+                       Font mf2 = SystemInformation.MenuFont;
+                       Assert.IsFalse (Object.ReferenceEquals (mf1, mf2), 
"ReferenceEquals");
+                       // yep, it's a clone
+               }
+
+               [Test]
+               [ExpectedException (typeof (ArgumentException))]
+               public void MenuFont_Dispose ()
+               {
+                       Font mf = SystemInformation.MenuFont;
+                       mf.Dispose ();
+                       Assert.AreEqual (SystemInformation.MenuFont.Height, 
mf.Height, "Height");
+                       // Font.Height can't be accessed after Dispose (see 
Font unit tests)
+               }
        }
-
 }
-
-

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to