13 |
|
|
14 |
|
|
15 |
#include "MeshAdapterTestCase.h" |
#include "MeshAdapterTestCase.h" |
16 |
|
#include <cppunit/CompilerOutputter.h> |
17 |
|
#include <cppunit/TestResult.h> |
18 |
|
#include <cppunit/TestResultCollector.h> |
19 |
|
#include <cppunit/TestRunner.h> |
20 |
|
|
|
#include "tools/CppUnitTest/TestRunner.h" |
|
21 |
|
|
22 |
using namespace CppUnitTest; |
using namespace CppUnit; |
23 |
|
|
24 |
extern "C"{ |
extern "C"{ |
25 |
#include "esysUtils/Esys_MPI.h" |
#include "esysUtils/Esys_MPI.h" |
27 |
|
|
28 |
int main(int argc, char* argv[]) |
int main(int argc, char* argv[]) |
29 |
{ |
{ |
|
|
|
30 |
#ifdef ESYS_MPI |
#ifdef ESYS_MPI |
31 |
int status = MPI_Init(&argc, &argv); |
int status = MPI_Init(&argc, &argv); |
32 |
if (status != MPI_SUCCESS) { |
if (status != MPI_SUCCESS) { |
33 |
std::cerr << argv[0] << ": MPI_Init failed, exiting." << std::endl; |
std::cerr << argv[0] << ": MPI_Init failed, exiting." << std::endl; |
34 |
return status; |
return status; |
35 |
} |
} |
36 |
#endif |
#endif |
37 |
|
TestResult controller; |
38 |
// |
TestResultCollector result; |
39 |
// object which runs all of the tests |
controller.addListener(&result); |
40 |
TestRunner runner; |
TestRunner runner; |
41 |
// |
runner.addTest(MeshAdapterTestCase::suite()); |
42 |
// add the RangeTestCase suite of tests to the runner |
runner.run(controller); |
43 |
runner.addTest ("MeshAdapter", MeshAdapterTestCase::suite()); |
CompilerOutputter outputter( &result, std::cerr ); |
44 |
|
outputter.write(); |
|
// actually run the unit tests. |
|
|
runner.run (argc, argv); |
|
|
|
|
45 |
#ifdef ESYS_MPI |
#ifdef ESYS_MPI |
46 |
MPI_Finalize(); |
MPI_Finalize(); |
47 |
#endif |
#endif |
48 |
|
return result.wasSuccessful() ? 0 : 1; |
|
return 0; |
|
49 |
} |
} |
50 |
|
|