libMesh
driver.C
Go to the documentation of this file.
1 #include <cppunit/extensions/TestFactoryRegistry.h>
2 #include <cppunit/ui/text/TestRunner.h>
3 
4 #include <libmesh/libmesh.h>
5 
6 #include "test_comm.h"
7 
8 int main( int argc, char **argv)
9 {
10  // Initialize the library. This is necessary because the library
11  // may depend on a number of other libraries (i.e. MPI and Petsc)
12  // that require initialization before use.
13  libMesh::LibMeshInit init(argc, argv);
14  TestCommWorld = &init.comm();
15 
16  CppUnit::TextUi::TestRunner runner;
17  CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
18  runner.addTest( registry.makeTest() );
19 
20  // If the tests all succeed, report success
21  if (runner.run())
22  return 0;
23 
24  // If any test fails report failure
25  return 1;
26 }
27 
Encapsulates the MPI_Comm object.
Definition: parallel.h:657
libMesh::Parallel::Communicator * TestCommWorld
Definition: driver.C:28
The LibMeshInit class, when constructed, initializes the dependent libraries (e.g.
Definition: libmesh.h:62
void init(triangulateio &t)
Initializes the fields of t to NULL/0 as necessary.
const Parallel::Communicator & comm() const
Definition: libmesh.h:81
int main(int argc, char **argv)
Definition: driver.C:8