Correct wxFont::GetFamily() unit test to test for wxFONTFAMILY_DEFAULT.
GetFamily() returns wxFONTFAMILY_DEFAULT and not wxFONTFAMILY_UNKNOWN since r65670. Correct the test to handle wxFONTFAMILY_DEFAULT as allowed value. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -131,10 +131,13 @@ void FontTestCase::GetSet()
|
|||||||
|
|
||||||
test.SetFamily( wxFONTFAMILY_ROMAN );
|
test.SetFamily( wxFONTFAMILY_ROMAN );
|
||||||
CPPUNIT_ASSERT( test.IsOk() );
|
CPPUNIT_ASSERT( test.IsOk() );
|
||||||
CPPUNIT_ASSERT( wxFONTFAMILY_ROMAN == test.GetFamily() ||
|
|
||||||
wxFONTFAMILY_UNKNOWN == test.GetFamily() );
|
|
||||||
// note that there is always the possibility that GetFamily() returns
|
// note that there is always the possibility that GetFamily() returns
|
||||||
// wxFONTFAMILY_UNKNOWN so that we consider it as a valid return value
|
// 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()
|
// test Get/SetEncoding()
|
||||||
|
Reference in New Issue
Block a user