add test for passing c_str() of temporary wxString to Printf()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2007-05-12 10:11:04 +00:00
parent 73049b0db3
commit 0dc8d2242c

View File

@ -71,6 +71,9 @@ void VarArgTestCase::StringPrintf()
s2.Printf(_T("[%s](%s)"), s.c_str(), "str");
CPPUNIT_ASSERT( s2 == "[bar = 11](str)" );
s2.Printf("%s mailbox", wxString("Opening").c_str());
CPPUNIT_ASSERT( s2 == "Opening mailbox" );
// test passing wxString directly:
s2.Printf(_T("[%s](%s)"), s, "str");
CPPUNIT_ASSERT( s2 == "[bar = 11](str)" );