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:
Vadim Zeitlin
2010-11-21 13:00:13 +00:00
parent f9ee3f4710
commit aa6b8882a4

View File

@@ -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()