lsp_test.cc
Go to the documentation of this file.
00001 #include <cppunit/BriefTestProgressListener.h>
00002 #include <cppunit/CompilerOutputter.h>
00003 #include <cppunit/extensions/TestFactoryRegistry.h>
00004 #include <cppunit/TestResult.h>
00005 #include <cppunit/TestResultCollector.h>
00006 #include <cppunit/TestRunner.h>
00007 
00008 int main( int argc, char* argv[] )
00009 {
00010         
00011         // Create the event manager and test controller
00012         CPPUNIT_NS::TestResult controller;
00013         
00014         // Add a listener that colllects test result
00015         CPPUNIT_NS::TestResultCollector result;
00016         controller.addListener( &result );        
00017         
00018         // Add a listener that print dots as test run.
00019         CPPUNIT_NS::BriefTestProgressListener progress;
00020         controller.addListener( &progress );      
00021         
00022         // Add the top suite to the test runner
00023         CPPUNIT_NS::TestRunner runner;
00024         runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() );
00025         runner.run( controller );
00026         
00027         // Print test in a compiler compatible format.
00028         CPPUNIT_NS::CompilerOutputter outputter( &result, CPPUNIT_NS::stdCOut() );
00029         outputter.write(); 
00030         
00031         return result.wasSuccessful() ? 0 : 1;
00032 }


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 Thu Aug 27 2015 15:20:57