GRINS-0.8.0
Functions | Variables
unit_driver.C File Reference
#include "grins_config.h"
#include "grins/simulation_initializer.h"
#include <libmesh/ignore_warnings.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/ui/text/TestRunner.h>
#include <libmesh/restore_warnings.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 39 of file unit_driver.C.

References TestCommWorld.

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

Variable Documentation

libMesh::Parallel::Communicator* TestCommWorld

Generated on Tue Dec 19 2017 12:47:29 for GRINS-0.8.0 by  doxygen 1.8.9.1