Author: spouliot
Date: 2006-06-28 15:35:18 -0400 (Wed, 28 Jun 2006)
New Revision: 62125
Modified:
trunk/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog
trunk/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs
Log:
2006-06-28 Sebastien Pouliot <[EMAIL PROTECTED]>
* TestFont.cs: Expanded a test case to check for bug #78721 where the
LOGFONT structure must be initialized even if the ToLogFont call fails
Modified: trunk/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog
===================================================================
--- trunk/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog
2006-06-28 19:29:35 UTC (rev 62124)
+++ trunk/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog
2006-06-28 19:35:18 UTC (rev 62125)
@@ -1,3 +1,8 @@
+2006-06-28 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * TestFont.cs: Expanded a test case to check for bug #78721 where the
+ LOGFONT structure must be initialized even if the ToLogFont call fails
+
2006-06-27 Sebastien Pouliot <[EMAIL PROTECTED]>
* TestBitmap.cs: Reactivate a test case (LockBitmap) as NotWorking and
Modified: trunk/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs
===================================================================
--- trunk/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs
2006-06-28 19:29:35 UTC (rev 62124)
+++ trunk/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs
2006-06-28 19:35:18 UTC (rev 62125)
@@ -371,13 +371,36 @@
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void Dispose_ToLogFont ()
{
Font f = new Font (name, 12.5f);
f.Dispose ();
LOGFONT lf = new LOGFONT();
- f.ToLogFont (lf);
+ Assert.AreEqual (0, lf.lfCharSet, "lfCharSet-0");
+ Assert.IsNull (lf.lfFaceName, "lfFaceName-0");
+ try {
+ f.ToLogFont (lf);
+ }
+ catch (ArgumentException) {
+ // it throws, but it also initialize the
LOGFONT to some values
+ Assert.AreEqual (0, lf.lfHeight, "lfHeight");
+ Assert.AreEqual (0, lf.lfWidth, "lfWidth");
+ Assert.AreEqual (0, lf.lfEscapement,
"lfEscapement");
+ Assert.AreEqual (0, lf.lfOrientation,
"lfOrientation");
+ Assert.AreEqual (0, lf.lfWeight, "lfWeight");
+ Assert.AreEqual (0, lf.lfItalic, "lfItalic");
+ Assert.AreEqual (0, lf.lfUnderline,
"lfUnderline");
+ Assert.AreEqual (0, lf.lfStrikeOut,
"lfStrikeOut");
+ Assert.AreEqual (1, lf.lfCharSet, "lfCharSet");
+ Assert.AreEqual (0, lf.lfOutPrecision,
"lfOutPrecision");
+ Assert.AreEqual (0, lf.lfClipPrecision,
"lfClipPrecision");
+ Assert.AreEqual (0, lf.lfQuality, "lfQuality");
+ Assert.AreEqual (0, lf.lfPitchAndFamily,
"lfPitchAndFamily");
+ Assert.AreEqual (String.Empty, lf.lfFaceName,
"lfFaceName");
+ }
+ catch (Exception e) {
+ Assert.Fail ("Unexpected exception {0}", e);
+ }
}
[Test]
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches