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:
Václav Slavík 2004-11-09 11:02:58 +00:00
parent 6b7d5d1c44
commit c33230b1c1

View File

@ -113,9 +113,9 @@ void RegExMatchTestCase::runTest()
wxString msgstr;
msgstr.Printf(_T("\\%d == '%s' (expected '%s')"),
(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)
@ -166,12 +166,10 @@ void RegExReplaceTestCase::runTest()
wxString msgstr;
msgstr.Printf(_T("returns '%s' (expected '%s')"), text.c_str(), m_expected.c_str());
const char *msg = msgstr.mb_str();
CPPUNIT_ASSERT_MESSAGE(msg, text == m_expected);
CPPUNIT_ASSERT_MESSAGE((const char*)msgstr.mb_str(), text == m_expected);
msgstr.Printf(_T("matches %d times (expected %d)"), nRepl, m_count);
msg = msgstr.mb_str();
CPPUNIT_ASSERT_MESSAGE(msg, nRepl == m_count);
CPPUNIT_ASSERT_MESSAGE((const char*)msgstr.mb_str(), nRepl == m_count);
}