lsp_test.cc
Go to the documentation of this file.
1 #include <cppunit/BriefTestProgressListener.h>
2 #include <cppunit/CompilerOutputter.h>
3 #include <cppunit/extensions/TestFactoryRegistry.h>
4 #include <cppunit/TestResult.h>
5 #include <cppunit/TestResultCollector.h>
6 #include <cppunit/TestRunner.h>
7 
8 int main( int argc, char* argv[] )
9 {
10 
11  // Create the event manager and test controller
12  CPPUNIT_NS::TestResult controller;
13 
14  // Add a listener that colllects test result
15  CPPUNIT_NS::TestResultCollector result;
16  controller.addListener( &result );
17 
18  // Add a listener that print dots as test run.
19  CPPUNIT_NS::BriefTestProgressListener progress;
20  controller.addListener( &progress );
21 
22  // Add the top suite to the test runner
23  CPPUNIT_NS::TestRunner runner;
24  runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() );
25  runner.run( controller );
26 
27  // Print test in a compiler compatible format.
28  CPPUNIT_NS::CompilerOutputter outputter( &result, CPPUNIT_NS::stdCOut() );
29  outputter.write();
30 
31  return result.wasSuccessful() ? 0 : 1;
32 }
int main(int argc, char *argv[])
Definition: lsp_test.cc:8
static int argc
static char * argv


stage
Author(s): Richard Vaughan , Brian Gerkey , Reed Hedges , Andrew Howard , Toby Collett , Pooya Karimian , Jeremy Asher , Alex Couture-Beil , Geoff Biggs , Rich Mattes , Abbas Sadat
autogenerated on Mon Jun 10 2019 15:06:09