runner.addTest(test.release());
}
+#if wxUSE_LOG
// Switch off logging unless --verbose
wxLog::EnableLogging(wxLog::GetVerbose());
-
- return m_list || runner.run("", false, true, !wxLog::GetVerbose()) ?
- EXIT_SUCCESS : EXIT_FAILURE;
+#endif // wxUSE_LOG
+
+ return m_list || runner.run("", false, true,
+#if wxUSE_LOG
+ !wxLog::GetVerbose()
+#else
+ true
+#endif // wxUSE_LOG
+ ) ? EXIT_SUCCESS : EXIT_FAILURE;
}
// List the tests
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(".:");
cout << " ";
cout << " " << name.substr(i + 1) << "\n";
}
- }
- if (suite) {
- typedef const vector<Test*> Tests;
+ typedef vector<Test*> Tests;
typedef Tests::const_iterator Iter;
- Tests& tests = suite->getTests();
+ const Tests& tests = suite->getTests();
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";
+ }
}