* SystemFontsTest.cs: Avoid failures (ignore tests) if no fonts are
available on the system.
svn path=/trunk/mcs/; revision=74460
+2007-03-16 Sebastien Pouliot <sebastien@ximian.com>
+
+ * SystemFontsTest.cs: Avoid failures (ignore tests) if no fonts are
+ available on the system.
+
2007-03-15 Sebastien Pouliot <sebastien@ximian.com>
* ColorConverter.cs: Merge ConvertFrom_NotWorking with ConvertFrom as
[TestFixture]
public class SystemFontsTest {
+ // avoid lots of failures if no fonts are available (e.g. headless systems)
+ static bool font_available;
+
+ [TestFixtureSetUp]
+ public void FixtureSetUp ()
+ {
+ try {
+ Font f = SystemFonts.DefaultFont;
+ font_available = true;
+ }
+ catch (ArgumentException) {
+ font_available = false;
+ }
+ }
+
+ [SetUp]
+ public void SetUp ()
+ {
+ if (!font_available)
+ Assert.Ignore ("No font family could be found.");
+ }
+
[Test]
public void DefaultFont ()
{