From: Vadim Zeitlin Date: Sat, 1 Apr 2006 15:53:55 +0000 (+0000) Subject: let the UTF7 test fail but not crash X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a905bdb8a46ce2516009d260bd75b47161c3d49a 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 --- diff --git a/tests/strings/unicode.cpp b/tests/strings/unicode.cpp index 0fd5b67670..f7ea978f4e 100644 --- a/tests/strings/unicode.cpp +++ b/tests/strings/unicode.cpp @@ -185,9 +185,14 @@ UnicodeTestCase::DoTestConversion(const char *s, wxWCharBuffer wbuf = conv.cMB2WC(s, (size_t)-1, NULL); if ( ws ) + { + CPPUNIT_ASSERT( wbuf.data() ); CPPUNIT_ASSERT( wx_wcscmp(wbuf, ws) == 0 ); - else + } + else // conversion is supposed to fail + { CPPUNIT_ASSERT_EQUAL( (wchar_t *)NULL, wbuf.data() ); + } } #endif // wxUSE_UNICODE/!wxUSE_UNICODE }