X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8899b155a1e4fa5f4b90e1f3bebe28088ea46bc9..6da8eee196a81d1626391916b6119f3c6ee63ad8:/tests/test.cpp?ds=sidebyside diff --git a/tests/test.cpp b/tests/test.cpp index 7c63b439a3..38c9175f9b 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -27,6 +27,7 @@ using CppUnit::Test; using CppUnit::TestSuite; using CppUnit::TestFactoryRegistry; using CppUnit::TextUi::TestRunner; +using CppUnit::CompilerOutputter; using std::string; using std::vector; @@ -69,6 +70,14 @@ bool TestApp::OnInit() { cout << "Test program for wxWidgets\n" << "build: " << WX_BUILD_OPTIONS_SIGNATURE << std::endl; + +#if !wxUSE_WXVSNPRINTF + cout << "\n"; + cout << "WARNING: VsnprintfTestCase will test the system vsnprintf() function\n"; + cout << " instead of the wxWidgets wxVsnprintf_ implementation!" << std::endl; + cout << "\n"; +#endif + return wxAppConsole::OnInit(); }; @@ -131,6 +140,8 @@ int TestApp::OnRun() runner.addTest(test.release()); } + runner.setOutputter(new CompilerOutputter(&runner.result(), cout)); + #if wxUSE_LOG // Switch off logging unless --verbose bool verbose = wxLog::GetVerbose(); @@ -155,7 +166,9 @@ void TestApp::List(Test *test, const string& parent /*=""*/) const // take the last component of the name and append to the parent name = test->getName(); string::size_type i = name.find_last_of(".:"); - name = parent + "." + (i != string::npos ? name.substr(i + 1) : name); + if (i != string::npos) + name = name.substr(i + 1); + name = parent + "." + name; // drop the 1st component from the display and indent if (parent != "") {