added tests demonstrating a bug in wxString::assign(itself)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-08-20 10:38:22 +00:00
parent 6848478c72
commit c8f313b256
2 changed files with 7 additions and 0 deletions

View File

@@ -176,6 +176,9 @@ 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 );