use more informative CPPUNIT_ASSERT_EQUAL instead of CPPUNIT_ASSERT

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-05-31 01:57:25 +00:00
parent e5c28d8710
commit 78648f606d

View File

@@ -387,13 +387,19 @@ const static unsigned char welcome_cp932[71] =
void MBConvTestCase::UTF7Tests()
{
#if 0
wxCSConv convUTF7(wxFONTENCODING_UTF7);
#else
wxMBConvUTF7 convUTF7;
#endif
TestDecoder
(
(const wchar_t*)welcome_wchar_t,
sizeof(welcome_wchar_t)/sizeof(wchar_t),
(const char*)welcome_utf7_iconv,
sizeof(welcome_utf7_iconv),
wxConvUTF7,
convUTF7,
1
);
TestDecoder
@@ -402,7 +408,7 @@ void MBConvTestCase::UTF7Tests()
sizeof(welcome_wchar_t)/sizeof(wchar_t),
(const char*)welcome_utf7_wx,
sizeof(welcome_utf7_wx),
wxConvUTF7,
convUTF7,
1
);
#if 0
@@ -415,7 +421,7 @@ void MBConvTestCase::UTF7Tests()
sizeof(welcome_wchar_t)/sizeof(wchar_t),
(const char*)welcome_utf7_iconv,
sizeof(welcome_utf7_iconv),
wxConvUTF7,
convUTF7,
1
);
#endif
@@ -425,7 +431,7 @@ void MBConvTestCase::UTF7Tests()
sizeof(welcome_wchar_t)/sizeof(wchar_t),
(const char*)welcome_utf7_wx,
sizeof(welcome_utf7_wx),
wxConvUTF7,
convUTF7,
1
);
}
@@ -893,7 +899,7 @@ void MBConvTestCase::TestDecoder(
0
);
// make sure the correct output length was calculated
CPPUNIT_ASSERT( outputWritten == wideChars );
CPPUNIT_ASSERT_EQUAL( wideChars, outputWritten );
// convert the string
size_t guardChars = 8; // to make sure we're not overrunning the output buffer
@@ -909,7 +915,7 @@ void MBConvTestCase::TestDecoder(
outputBufferChars
);
// make sure the correct number of characters were outputs
CPPUNIT_ASSERT( outputWritten == wideChars );
CPPUNIT_ASSERT_EQUAL( wideChars, outputWritten );
// make sure the characters generated are correct
CPPUNIT_ASSERT( 0 == memcmp( outputBuffer, wideBuffer, wideChars*sizeof(wchar_t) ) );
@@ -953,7 +959,7 @@ void MBConvTestCase::TestEncoder(
0
);
// make sure the correct output length was calculated
CPPUNIT_ASSERT( outputWritten == multiBytes );
CPPUNIT_ASSERT_EQUAL( multiBytes, outputWritten );
// convert the string
size_t guardBytes = 8; // to make sure we're not overrunning the output buffer
@@ -969,7 +975,7 @@ void MBConvTestCase::TestEncoder(
);
// make sure the correct number of characters were output
CPPUNIT_ASSERT( outputWritten == multiBytes );
CPPUNIT_ASSERT_EQUAL( multiBytes, outputWritten );
// make sure the characters generated are correct
CPPUNIT_ASSERT( 0 == memcmp( outputBuffer, multiBuffer, multiBytes ) );