X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b7cb8553f339fd23fc3f8330ef649b80a281e797..63509fb3c424dd69d8f5db35f7ae16950b9a3595:/tests/font/fonttest.cpp diff --git a/tests/font/fonttest.cpp b/tests/font/fonttest.cpp index 1c436ddf20..24a28a7904 100644 --- a/tests/font/fonttest.cpp +++ b/tests/font/fonttest.cpp @@ -68,7 +68,7 @@ private: // register in the unnamed registry so that these tests are run by default CPPUNIT_TEST_SUITE_REGISTRATION( FontTestCase ); -// 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( FontTestCase, "FontTestCase" ); wxString DumpFont(const wxFont *font) @@ -131,10 +131,13 @@ void FontTestCase::GetSet() test.SetFamily( wxFONTFAMILY_ROMAN ); CPPUNIT_ASSERT( test.IsOk() ); - CPPUNIT_ASSERT( wxFONTFAMILY_ROMAN == test.GetFamily() || - wxFONTFAMILY_UNKNOWN == test.GetFamily() ); - // note that there is always the possibility that GetFamily() returns - // wxFONTFAMILY_UNKNOWN so that we consider it as a valid return value + + // note that there is always the possibility that GetFamily() returns + // wxFONTFAMILY_DEFAULT (meaning "unknown" in this case) so that we + // consider it as a valid return value + const wxFontFamily family = test.GetFamily(); + if ( family != wxFONTFAMILY_DEFAULT ) + CPPUNIT_ASSERT_EQUAL( wxFONTFAMILY_ROMAN, family ); // test Get/SetEncoding()