From: Václav Slavík Date: Sat, 12 May 2007 10:11:04 +0000 (+0000) Subject: add test for passing c_str() of temporary wxString to Printf() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0dc8d2242c200694be1df1d9446435ac5c1a8fbc 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 --- diff --git a/tests/strings/vararg.cpp b/tests/strings/vararg.cpp index 7b397c2193..95d24dca02 100644 --- a/tests/strings/vararg.cpp +++ b/tests/strings/vararg.cpp @@ -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)" );