correct test failures under MSW, it shouldn't assume that all predefined fonts have non-empty facenames

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-05-17 11:52:26 +00:00
parent c56fc0dc30
commit a15239a6fd

View File

@@ -106,7 +106,7 @@ void SettingsTestCase::GlobalColours()
void SettingsTestCase::GlobalFonts() void SettingsTestCase::GlobalFonts()
{ {
wxFont font[] = const wxFont font[] =
{ {
*wxNORMAL_FONT, *wxNORMAL_FONT,
*wxSMALL_FONT, *wxSMALL_FONT,
@@ -115,8 +115,13 @@ void SettingsTestCase::GlobalFonts()
}; };
for (unsigned int i=0; i < WXSIZEOF(font); i++) 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() void SettingsTestCase::GlobalBrushes()