diff --git a/include/wx/cppunit.h b/include/wx/cppunit.h index dbdae16f4a..756ecfa118 100644 --- a/include/wx/cppunit.h +++ b/include/wx/cppunit.h @@ -27,6 +27,15 @@ #ifdef __BORLANDC__ #pragma warn -8022 #endif + +/////////////////////////////////////////////////////////////////////////////// +// Set the default format for the errors, which can be used by an IDE to jump +// to the error location. This default gets overridden by the cppunit headers +// for some compilers (e.g. VC++). + +#ifndef CPPUNIT_COMPILER_LOCATION_FORMAT + #define CPPUNIT_COMPILER_LOCATION_FORMAT "%p:%l:" +#endif /////////////////////////////////////////////////////////////////////////////// @@ -38,6 +47,7 @@ #include #include #include +#include #include "wx/afterstd.h" diff --git a/tests/test.cpp b/tests/test.cpp index e6861bee35..b26e73317f 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; @@ -131,6 +132,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();