ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/test/io/IOTest.cpp
Revision: 1573
Committed: Fri Oct 15 15:37:40 2004 UTC (19 years, 9 months ago) by tim
File size: 884 byte(s)
Log Message:
add ifstrstreamTestCase

File Contents

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

Properties

Name Value
svn:executable *