]> git.saurik.com Git - wxWidgets.git/commitdiff
correct test failures under MSW, it shouldn't assume that all predefined fonts have...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 17 May 2009 11:52:26 +0000 (11:52 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 17 May 2009 11:52:26 +0000 (11:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/misc/settings.cpp

index 49b072e1fc846653a38812f250e716a58bbe1b61..0c01100932df36027636af012eca1c6f6df4c043 100644 (file)
@@ -106,7 +106,7 @@ void SettingsTestCase::GlobalColours()
 
 void SettingsTestCase::GlobalFonts()
 {
-    wxFont font[] =
+    const wxFont font[] =
     {
         *wxNORMAL_FONT,
         *wxSMALL_FONT,
@@ -115,8 +115,13 @@ void SettingsTestCase::GlobalFonts()
     };
 
     for (unsigned int i=0; i < WXSIZEOF(font); i++)
-        CPPUNIT_ASSERT( font[i].IsOk() && 
-                        wxFontEnumerator::IsValidFacename(font[i].GetFaceName()) );
+    {
+        CPPUNIT_ASSERT( font[i].IsOk() );
+
+        const wxString facename = font[i].GetFaceName();
+        if ( !facename.empty() )
+            CPPUNIT_ASSERT( wxFontEnumerator::IsValidFacename(facename) );
+    }
 }
 
 void SettingsTestCase::GlobalBrushes()