ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/devel_omp/test/io/IOTest.cpp
Revision: 1594
Committed: Tue Jul 19 16:45:30 2011 UTC (14 years, 5 months ago) by chuckv
File size: 884 byte(s)
Log Message:
Branching from main development branch to OpenMP dev version at dev branch 1593

File Contents

# Content
1 #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 *