memory corruption fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
6b7d5d1c44
commit
c33230b1c1
@ -113,9 +113,9 @@ void RegExMatchTestCase::runTest()
|
|||||||
wxString msgstr;
|
wxString msgstr;
|
||||||
msgstr.Printf(_T("\\%d == '%s' (expected '%s')"),
|
msgstr.Printf(_T("\\%d == '%s' (expected '%s')"),
|
||||||
(int)i, result.c_str(), expected.c_str());
|
(int)i, result.c_str(), expected.c_str());
|
||||||
const char *msg = msgstr.mb_str();
|
|
||||||
|
|
||||||
CPPUNIT_ASSERT_MESSAGE(msg, result == expected);
|
CPPUNIT_ASSERT_MESSAGE((const char*)msgstr.mb_str(),
|
||||||
|
result == expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((m_flags & wxRE_NOSUB) == 0)
|
if ((m_flags & wxRE_NOSUB) == 0)
|
||||||
@ -166,12 +166,10 @@ void RegExReplaceTestCase::runTest()
|
|||||||
|
|
||||||
wxString msgstr;
|
wxString msgstr;
|
||||||
msgstr.Printf(_T("returns '%s' (expected '%s')"), text.c_str(), m_expected.c_str());
|
msgstr.Printf(_T("returns '%s' (expected '%s')"), text.c_str(), m_expected.c_str());
|
||||||
const char *msg = msgstr.mb_str();
|
CPPUNIT_ASSERT_MESSAGE((const char*)msgstr.mb_str(), text == m_expected);
|
||||||
CPPUNIT_ASSERT_MESSAGE(msg, text == m_expected);
|
|
||||||
|
|
||||||
msgstr.Printf(_T("matches %d times (expected %d)"), nRepl, m_count);
|
msgstr.Printf(_T("matches %d times (expected %d)"), nRepl, m_count);
|
||||||
msg = msgstr.mb_str();
|
CPPUNIT_ASSERT_MESSAGE((const char*)msgstr.mb_str(), nRepl == m_count);
|
||||||
CPPUNIT_ASSERT_MESSAGE(msg, nRepl == m_count);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user