GRINS-0.7.0
Functions | Variables
unit_driver.C File Reference
#include "grins_config.h"
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/ui/text/TestRunner.h>
#include <libmesh/libmesh.h>
#include "test_comm.h"
Include dependency graph for unit_driver.C:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Variables

libMesh::Parallel::Communicator * TestCommWorld
 

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 36 of file unit_driver.C.

References TestCommWorld.

37 {
38 #ifdef GRINS_HAVE_CPPUNIT
39 
40  // Initialize the library. This is necessary because the library
41  // may depend on a number of other libraries (i.e. MPI and Petsc)
42  // that require initialization before use.
43  libMesh::LibMeshInit init(argc, argv);
44  TestCommWorld = &init.comm();
45 
46  CppUnit::TextUi::TestRunner runner;
47  CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
48  runner.addTest( registry.makeTest() );
49 
50  // If the tests all succeed, report success
51  if (runner.run())
52  return 0;
53 
54  // If any test fails report failure
55  return 1;
56 
57 #else
58  // If we don't have CPPUnit, report we skipped
59  // 77 return code tells Automake we skipped this.
60  return 77;
61 #endif // GRINS_HAVE_CPPUNIT
62 }
libMesh::Parallel::Communicator * TestCommWorld
Definition: unit_driver.C:65

Variable Documentation

libMesh::Parallel::Communicator* TestCommWorld

Generated on Thu Jun 2 2016 21:52:30 for GRINS-0.7.0 by  doxygen 1.8.10