]> git.saurik.com Git - wxWidgets.git/commitdiff
Change the format of the output so that you can jump to the error with your editor.
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Sun, 1 May 2005 20:04:47 +0000 (20:04 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Sun, 1 May 2005 20:04:47 +0000 (20:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/cppunit.h
tests/test.cpp

index dbdae16f4ac1e2e3deefe07f380a8f56aff1ae22..756ecfa1185ce6484905ca037a96a679ea3a1d5c 100644 (file)
 #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 <cppunit/ui/text/TestRunner.h>
 #include <cppunit/TestCase.h>
 #include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/CompilerOutputter.h>
 #include "wx/afterstd.h"
 
 
index e6861bee35cf7f314e4f7c0fab4bf992eb7e5c41..b26e73317f0e682dd3cf0ae5d457f2aa50581537 100644 (file)
@@ -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();