]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/test.cpp
Renamed DrawCheckButton due to conflict with existing and public api of wxUniversal...
[wxWidgets.git] / tests / test.cpp
index c5038865112f34d4519b9e95c21a424a61e1aeee..b26e73317f0e682dd3cf0ae5d457f2aa50581537 100644 (file)
@@ -7,13 +7,9 @@
 // Licence:     wxWidgets licence
 ///////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWidgets licence
 ///////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(__APPLE__)
-    #pragma implementation
-    #pragma interface
-#endif
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
+// For compilers that support precompilation, includes "wx/wx.h"
+// and "wx/cppunit.h"
+#include "testprec.h"
 
 #ifdef __BORLANDC__
     #pragma hdrstop
 
 #ifdef __BORLANDC__
     #pragma hdrstop
 #endif
 
 #include "wx/cmdline.h"
 #endif
 
 #include "wx/cmdline.h"
-#include "wx/cppunit.h"
 #include <iostream>
 
 using CppUnit::Test;
 using CppUnit::TestSuite;
 using CppUnit::TestFactoryRegistry;
 using CppUnit::TextUi::TestRunner;
 #include <iostream>
 
 using CppUnit::Test;
 using CppUnit::TestSuite;
 using CppUnit::TestFactoryRegistry;
 using CppUnit::TextUi::TestRunner;
+using CppUnit::CompilerOutputter;
 
 using std::string;
 using std::vector;
 
 using std::string;
 using std::vector;
@@ -136,6 +132,8 @@ int TestApp::OnRun()
             runner.addTest(test.release());
     }
 
             runner.addTest(test.release());
     }
 
+    runner.setOutputter(new CompilerOutputter(&runner.result(), cout));
+
 #if wxUSE_LOG
     // Switch off logging unless --verbose
     bool verbose = wxLog::GetVerbose();
 #if wxUSE_LOG
     // Switch off logging unless --verbose
     bool verbose = wxLog::GetVerbose();
@@ -160,7 +158,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(".:");
         // 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 != "") {
 
         // drop the 1st component from the display and indent
         if (parent != "") {