]> git.saurik.com Git - wxWidgets.git/commitdiff
make assertion failure messages more useful by using WX_ASSERT_STR_EQUAL instead...
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 30 May 2008 22:57:32 +0000 (22:57 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 30 May 2008 22:57:32 +0000 (22:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/fontmap/fontmaptest.cpp

index ea36961c174c80b74fb518441d9af69eea310e38..ea40742fc307d51d5a93dd85ded9c4fe28a0ce14 100644 (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) );
     }
 }