From baf3d1dc0aa18f2e4f283d7c53f110a40845d68d Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Tue, 24 Apr 2007 14:09:51 +0000 Subject: [PATCH] added test for a crash when passing wxCStrData constructed from a literal (operator?: operand) to a vararg template git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/strings/vararg.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/strings/vararg.cpp b/tests/strings/vararg.cpp index 52fdcfec60..63013a90e8 100644 --- a/tests/strings/vararg.cpp +++ b/tests/strings/vararg.cpp @@ -75,4 +75,9 @@ void VarArgTestCase::StringPrintf() CPPUNIT_ASSERT( s2 == "(FooBar)" ); s2.Printf(_T("value=%s;"), s.wc_str()); CPPUNIT_ASSERT( s2 == "value=FooBar;" ); + + // this tests correct passing of wxCStrData constructed from string + // literal: + bool cond = true; + s2.Printf(_T("foo %s"), !cond ? s.c_str() : _T("bar")); } -- 2.47.2