]> git.saurik.com Git - wxWidgets.git/commitdiff
add test for passing c_str() of temporary wxString to Printf()
authorVáclav Slavík <vslavik@fastmail.fm>
Sat, 12 May 2007 10:11:04 +0000 (10:11 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sat, 12 May 2007 10:11:04 +0000 (10:11 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/strings/vararg.cpp

index 7b397c2193f3de4b29f2a88933e270ea952fa2e6..95d24dca02f0da1c846c8ed25bce3d60e6aa1aee 100644 (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)" );