let the UTF7 test fail but not crash
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -185,9 +185,14 @@ UnicodeTestCase::DoTestConversion(const char *s,
|
|||||||
wxWCharBuffer wbuf = conv.cMB2WC(s, (size_t)-1, NULL);
|
wxWCharBuffer wbuf = conv.cMB2WC(s, (size_t)-1, NULL);
|
||||||
|
|
||||||
if ( ws )
|
if ( ws )
|
||||||
|
{
|
||||||
|
CPPUNIT_ASSERT( wbuf.data() );
|
||||||
CPPUNIT_ASSERT( wx_wcscmp(wbuf, ws) == 0 );
|
CPPUNIT_ASSERT( wx_wcscmp(wbuf, ws) == 0 );
|
||||||
else
|
}
|
||||||
|
else // conversion is supposed to fail
|
||||||
|
{
|
||||||
CPPUNIT_ASSERT_EQUAL( (wchar_t *)NULL, wbuf.data() );
|
CPPUNIT_ASSERT_EQUAL( (wchar_t *)NULL, wbuf.data() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif // wxUSE_UNICODE/!wxUSE_UNICODE
|
#endif // wxUSE_UNICODE/!wxUSE_UNICODE
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user