X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8057186b81d726303f42348a18a3357557a03874..3942aa77f5f737e668137a09ee197c7099c45a9e:/tests/misc/settings.cpp diff --git a/tests/misc/settings.cpp b/tests/misc/settings.cpp index 49b072e1fc..c89fdfcfb2 100644 --- a/tests/misc/settings.cpp +++ b/tests/misc/settings.cpp @@ -56,7 +56,7 @@ private: // register in the unnamed registry so that these tests are run by default CPPUNIT_TEST_SUITE_REGISTRATION( SettingsTestCase ); -// also include in it's own registry so that these tests can be run alone +// also include in its own registry so that these tests can be run alone CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( SettingsTestCase, "SettingsTestCase" ); @@ -106,7 +106,7 @@ void SettingsTestCase::GlobalColours() void SettingsTestCase::GlobalFonts() { - wxFont font[] = + const wxFont font[] = { *wxNORMAL_FONT, *wxSMALL_FONT, @@ -115,8 +115,18 @@ 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() ) + { + WX_ASSERT_MESSAGE( + ("font #%u: facename \"%s\" is invalid", i, facename), + wxFontEnumerator::IsValidFacename(facename) + ); + } + } } void SettingsTestCase::GlobalBrushes()