get rid of special WX_ASSERT_FOO_EQUAL macros by defining CppUnit::assertEquals() overloads for wx types

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-07-18 23:07:23 +00:00
parent a6eac99d9e
commit 1de532f57e
16 changed files with 191 additions and 155 deletions

View File

@@ -198,13 +198,13 @@ void UnicodeTestCase::ConstructorsWithConversion()
#if wxUSE_UNICODE
const wchar_t wchar[] = {0x44,0xE9,0x6A,0xE0,0};
WX_ASSERT_STR_EQUAL( wchar, s1 );
CPPUNIT_ASSERT_EQUAL( wchar, s1 );
wxString s2(wchar);
WX_ASSERT_STR_EQUAL( wchar, s2 );
WX_ASSERT_STR_EQUAL( utf8, s2 );
CPPUNIT_ASSERT_EQUAL( wchar, s2 );
CPPUNIT_ASSERT_EQUAL( utf8, s2 );
#else
WX_ASSERT_STR_EQUAL( utf8, s1 );
CPPUNIT_ASSERT_EQUAL( utf8, s1 );
#endif
wxString sub(utf8sub, wxConvUTF8); // "Dej" substring
@@ -224,12 +224,12 @@ void UnicodeTestCase::ConstructorsWithConversion()
// test using Unicode strings together with char* strings (this must work
// in ANSI mode as well, of course):
wxString s5("ascii");
WX_ASSERT_STR_EQUAL( "ascii", s5 );
CPPUNIT_ASSERT_EQUAL( "ascii", s5 );
s5 += " value";
CPPUNIT_ASSERT( strcmp(s5.mb_str(), "ascii value") == 0 );
WX_ASSERT_STR_EQUAL( "ascii value", s5 );
CPPUNIT_ASSERT_EQUAL( "ascii value", s5 );
CPPUNIT_ASSERT( s5 != "SomethingElse" );
}