]> git.saurik.com Git - wxWidgets.git/commitdiff
let the UTF7 test fail but not crash
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 1 Apr 2006 15:53:55 +0000 (15:53 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 1 Apr 2006 15:53:55 +0000 (15:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/strings/unicode.cpp

index 0fd5b67670ac8f5a1bcef27d801c1ece5c038343..f7ea978f4ead730b2581986dc6c8841d57e370fb 100644 (file)
@@ -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
 }