moved wxRegEx test from console to testsuite (patch 938995)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2004-04-21 20:17:18 +00:00
parent 17aa28a91b
commit bc10103ec8
13 changed files with 395 additions and 231 deletions

View File

@@ -143,7 +143,7 @@ void TestApp::List(Test *test, const string& parent /*=""*/) const
TestSuite *suite = dynamic_cast<TestSuite*>(test);
string name;
if (suite || m_longlist) {
if (suite) {
// take the last component of the name and append to the parent
name = test->getName();
string::size_type i = name.find_last_of(".:");
@@ -156,9 +156,7 @@ void TestApp::List(Test *test, const string& parent /*=""*/) const
cout << " ";
cout << " " << name.substr(i + 1) << "\n";
}
}
if (suite) {
typedef const vector<Test*> Tests;
typedef Tests::const_iterator Iter;
@@ -167,4 +165,10 @@ void TestApp::List(Test *test, const string& parent /*=""*/) const
for (Iter it = tests.begin(); it != tests.end(); ++it)
List(*it, name);
}
else if (m_longlist) {
string::size_type i = 0;
while ((i = parent.find('.', i + 1)) != string::npos)
cout << " ";
cout << " " << test->getName() << "\n";
}
}