compilation fix for wxUSE_STD_STRING==0

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-03-22 16:10:09 +00:00
parent 34085a0d4f
commit 6582f59207

View File

@@ -118,7 +118,7 @@ private:
bool m_longlist; bool m_longlist;
bool m_detail; bool m_detail;
bool m_timing; bool m_timing;
vector<string> m_registries; wxArrayString m_registries;
// event handling hooks // event handling hooks
FilterEventFunc m_filterEventFunc; FilterEventFunc m_filterEventFunc;
@@ -186,7 +186,7 @@ bool TestApp::OnCmdLineParsed(wxCmdLineParser& parser)
{ {
if (parser.GetParamCount()) if (parser.GetParamCount())
for (size_t i = 0; i < parser.GetParamCount(); i++) for (size_t i = 0; i < parser.GetParamCount(); i++)
m_registries.push_back(string(parser.GetParam(i).mb_str())); m_registries.push_back(parser.GetParam(i));
else else
m_registries.push_back(""); m_registries.push_back("");
@@ -233,21 +233,20 @@ int TestApp::OnRun()
for (size_t i = 0; i < m_registries.size(); i++) for (size_t i = 0; i < m_registries.size(); i++)
{ {
std::string reg = m_registries[i]; wxString reg = m_registries[i];
if (!reg.empty() && !wxString(reg).EndsWith("TestCase")) if (!reg.empty() && !reg.EndsWith("TestCase"))
reg += "TestCase"; reg += "TestCase";
// allow the user to specify the name of the testcase "in short form" // allow the user to specify the name of the testcase "in short form"
// (all wx test cases end with TestCase postfix) // (all wx test cases end with TestCase postfix)
auto_ptr<Test> test(reg.empty() ? auto_ptr<Test> test(reg.empty() ?
TestFactoryRegistry::getRegistry().makeTest() : TestFactoryRegistry::getRegistry().makeTest() :
TestFactoryRegistry::getRegistry(reg).makeTest()); TestFactoryRegistry::getRegistry(string(reg.mb_str())).makeTest());
TestSuite *suite = dynamic_cast<TestSuite*>(test.get()); TestSuite *suite = dynamic_cast<TestSuite*>(test.get());
if (suite && suite->countTestCases() == 0) if (suite && suite->countTestCases() == 0)
wxLogError(_T("No such test suite: %s"), wxLogError(_T("No such test suite: %s"), reg);
wxString(reg.c_str(), wxConvUTF8).c_str());
else if (m_list) else if (m_list)
List(test.get()); List(test.get());
else else