Handle bad conversions correctly. Add Bad UTF8 test.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ryan Norton
2004-10-29 10:13:59 +00:00
parent c20d8682bd
commit bdd8f35a58
2 changed files with 29 additions and 5 deletions

View File

@@ -185,6 +185,14 @@ void StringTestCase::ConstructorsWithConversion()
CPPUNIT_ASSERT( s3 == sub );
CPPUNIT_ASSERT( s4 == sub );
#if wxUSE_UNICODE
CPPUNIT_ASSERT ( wxString("\t[pl]open.format.Sformatuj dyskietk<74>=gfloppy %f",
wxConvUTF8) == wxT("") ); //Pos 35 (funky e) is invalid UTF8
#else
CPPUNIT_ASSERT ( wxString(L"\t[pl]open.format.Sformatuj dyskietk<74>=gfloppy %f",
wxConvUTF8) == wxT("") ); //Pos 35 (funky e) is invalid UTF8
#endif
}
void StringTestCase::Conversion()