X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c8f313b2565998ca68914a6dbeca4341964a37b7..dd9f8b6bb6935360a8271dc3e8749fb026b601a8:/tests/strings/stdstrings.cpp diff --git a/tests/strings/stdstrings.cpp b/tests/strings/stdstrings.cpp index 99355fe751..585d65c6e4 100644 --- a/tests/strings/stdstrings.cpp +++ b/tests/strings/stdstrings.cpp @@ -176,9 +176,6 @@ void StdStringTestCase::StdAssign() CPPUNIT_ASSERT( s5 == _T("aaa") ); CPPUNIT_ASSERT( s6 == _T("ef") ); - s1.assign(s1, 1, 1); - WX_ASSERT_STR_EQUAL("e", s1); - const char *pc = s1.c_str(); s7.assign(pc, pc + 2); WX_ASSERT_STR_EQUAL( "de", s7 ); @@ -186,6 +183,9 @@ void StdStringTestCase::StdAssign() const wchar_t *pw = s1.c_str(); s8.assign(pw + 2, pw + 3); WX_ASSERT_STR_EQUAL( "f", s8 ); + + s1.assign(s1, 1, 1); + WX_ASSERT_STR_EQUAL("e", s1); } void StdStringTestCase::StdCompare() @@ -488,6 +488,11 @@ void StdStringTestCase::StdResize() CPPUNIT_ASSERT( s2 == _T("abcABCdefD") ); CPPUNIT_ASSERT( s3 == _T("abcABCdefDEF ") ); CPPUNIT_ASSERT( s4 == _T("abcABCdefDEFWW") ); + + wxString s = + wxString::FromUTF8("\xd0\x9f\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82"); + s.resize(3); + WX_ASSERT_STR_EQUAL("\xd0\x9f\xd1\x80\xd0\xb8", s); } void StdStringTestCase::StdRiter()