From a7e4ce11c88bff7b86d57bab6ee7e7e3f31139ae Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Tue, 19 Sep 2006 13:50:39 +0000 Subject: [PATCH] 2006-09-19 Sebastien Pouliot * TestGraphics.cs: Avoid test cases failure if the font object can't be created during fixture's setup. svn path=/trunk/mcs/; revision=65642 --- mcs/class/System.Drawing/Test/System.Drawing/ChangeLog | 4 +++- mcs/class/System.Drawing/Test/System.Drawing/TestGraphics.cs | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog b/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog index 893c2aa0095..dfc22dd90a1 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog +++ b/mcs/class/System.Drawing/Test/System.Drawing/ChangeLog @@ -1,7 +1,9 @@ -2006-09-19 Sebastien Pouliot +2006-09-19 Sebastien Pouliot * GDIPlusTest.cs: Added test cases for GdipMeasureCharacterRanges and StringFormat functions. + * TestGraphics.cs: Avoid test cases failure if the font object can't + be created during fixture's setup. * TestStringFormat.cs: Increased coverage of the unit tests. 2006-09-18 Sebastien Pouliot diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestGraphics.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestGraphics.cs index e0a3a5bc557..24cfee1c336 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestGraphics.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/TestGraphics.cs @@ -46,13 +46,18 @@ namespace MonoTests.System.Drawing [TestFixtureSetUp] public void FixtureSetUp () { - font = new Font ("Arial", 12); + try { + font = new Font ("Arial", 12); + } + catch { + } } [TestFixtureTearDown] public void FixtureTearDown () { - font.Dispose (); + if (font != null) + font.Dispose (); } -- 2.11.4.GIT