ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/test/brains/BrainsTest.cpp
Revision: 1629
Committed: Thu Oct 21 21:30:34 2004 UTC (19 years, 8 months ago) by tim
File size: 777 byte(s)
Log Message:
adding test case for Snapshot and snapshotManager.

File Contents

# User Rev Content
1 tim 1629 #include <cppunit/CompilerOutputter.h>
2     #include <cppunit/extensions/TestFactoryRegistry.h>
3     #include <cppunit/ui/text/TestRunner.h>
4    
5    
6     int main(int argc, char* argv[])
7     {
8     // Get the top level suite from the registry
9     CPPUNIT_NS::Test *suite = CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest();
10    
11     // Adds the test to the list of test to run
12     CPPUNIT_NS::TextUi::TestRunner runner;
13     runner.addTest( suite );
14    
15     // Change the default outputter to a compiler error format outputter
16     runner.setOutputter( new CPPUNIT_NS::CompilerOutputter( &runner.result(),
17     std::cerr ) );
18     // Run the test.
19     bool wasSucessful = runner.run();
20    
21     // Return error code 1 if the one of test failed.
22     return wasSucessful ? 0 : 1;
23     }
24