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

O3DBITestMain.cpp

Go to the documentation of this file.
00001 
00013 #include <cppunit/CompilerOutputter.h>
00014 #include <cppunit/extensions/TestFactoryRegistry.h>
00015 #include <cppunit/ui/text/TestRunner.h>
00016 
00017 #ifndef UNICODE
00018 #define MAIN        main(int argc, char* argv[])
00019 #else
00020 #define MAIN        wmain(int argc, wchar_t* argv[])
00021 #endif // UNICODE
00022 
00023 int MAIN
00024 {
00025     // Get the top level suite from the registry
00026     CppUnit::Test* pSuite =
00027         CppUnit::TestFactoryRegistry::getRegistry().makeTest();
00028 
00029     // Adds the test suite to the list of tests to run
00030     CppUnit::TextUi::TestRunner runner;
00031     runner.addTest(pSuite);
00032 
00033     CppUnit::CompilerOutputter* pOutputter =
00034         new CppUnit::CompilerOutputter(&runner.result(), std::cerr);
00035     // Change the default outputter to a compiler error format outputter
00036     runner.setOutputter(pOutputter);
00037 
00038     // Run the tests
00039     bool bWasSucessful = runner.run();
00040     
00041     system("Pause");    // Wait for ENTER key
00042 
00043     // Return 0 if everything works out, number of errors otherwise
00044     return (bWasSucessful ? 0 : 1);
00045 }
00046  



SourceForge.net Logo Generated on Sun Jan 23 11:36:35 2005 for Oracle Object Oriented Database Interface (O3DBI) by  doxygen 1.3.9.1