text: 
  #include <cppunit/CompilerOutputter.h>
  #include <cppunit/extensions/TestFactoryRegistry.h>
  #include <cppunit/TestResult.h>
  #include <cppunit/TestResultCollector.h>
  #include <cppunit/ui/text/TestRunner.h>
  #include <cppunit/BriefTestProgressListener.h>
  
  int main (int argc, char* argv[]) {
          CPPUNIT_NS :: TestResult testresult;
          CPPUNIT_NS :: TestResultCollector collectedresults;
          testresult.addListener (&collectedresults);
  
          CPPUNIT_NS :: BriefTestProgressListener progress;
          testresult.addListener (&progress);
  
  //        CPPUNIT_NS :: TestRunner testrunner;
          CppUnit::TextUi::TestRunner testrunner;
          testrunner.addTest (CPPUNIT_NS :: TestFactoryRegistry :: getRegistry ().makeTest ());
          testrunner.run (testresult);
  
          CPPUNIT_NS :: CompilerOutputter compileroutputter (&collectedresults, std::cerr);
          compileroutputter.write();
  
          return collectedresults.wasSuccessful () ? 0 : 1;
  }
  