Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

TestRunner.cpp

Go to the documentation of this file.
00001 #include <cppunit/extensions/TestFactoryRegistry.h>
00002 #include <cppunit/ui/text/TestRunner.h>
00003 #include <string>
00004 
00005 
00006 int main(int argc, char** argv)
00007 {
00008   CppUnit::TextUi::TestRunner   
00009                runner; // Control tests.
00010   CppUnit::TestFactoryRegistry& 
00011                registry(CppUnit::TestFactoryRegistry::getRegistry());
00012 
00013   runner.addTest(registry.makeTest());
00014 
00015   bool wasSucessful;
00016   try {
00017     wasSucessful = runner.run("",false);
00018   } 
00019   catch(string& rFailure) {
00020     cerr << "Caught a string exception from test suites.: \n";
00021     cerr << rFailure << endl;
00022     wasSucessful = false;
00023   }
00024   return !wasSucessful;
00025 }
00026 void* gpTCLApplication;

Generated on Fri Mar 12 13:04:04 2004 for Scripted Readout by doxygen 1.3.4