make assertion failure messages more useful by using WX_ASSERT_STR_EQUAL instead of just CPPUNIT_ASSERT

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2008-05-30 22:57:32 +00:00
parent 8f4b0f43f0
commit 788257c0a4

View File

@ -108,11 +108,12 @@ void FontMapperTestCase::NamesAndDesc()
_T("Unknown encoding (-1)" ),
};
wxFontMapperBase& fmap = *wxFontMapperBase::Get();
for ( size_t n = 0; n < WXSIZEOF(charsets); n++ )
{
wxFontEncoding enc = wxFontMapperBase::Get()->CharsetToEncoding(charsets[n]);
CPPUNIT_ASSERT( wxFontMapperBase::Get()->GetEncodingName(enc).CmpNoCase(names[n]) == 0 );
CPPUNIT_ASSERT( wxFontMapperBase::Get()->GetEncodingDescription(enc) == descriptions[n] );
wxFontEncoding enc = fmap.CharsetToEncoding(charsets[n]);
WX_ASSERT_STR_EQUAL( names[n], fmap.GetEncodingName(enc).Lower() );
WX_ASSERT_STR_EQUAL( descriptions[n], fmap.GetEncodingDescription(enc) );
}
}