| Rev | Line | |
|---|
| [ac6d04] | 1 | #ifdef HAVE_CONFIG_H
|
|---|
| 2 | #include <config.h>
|
|---|
| 3 | #endif
|
|---|
| 4 |
|
|---|
| 5 | #ifdef HAVE_MPI
|
|---|
| 6 | #include <mpi.h>
|
|---|
| 7 | #endif
|
|---|
| 8 |
|
|---|
| 9 | #ifndef BOOST_TEST_NO_MAIN
|
|---|
| 10 | #define BOOST_TEST_NO_MAIN
|
|---|
| 11 | #endif
|
|---|
| 12 |
|
|---|
| 13 | #ifdef HAVE_BOOST_UNIT_TEST_FRAMEWORK_LIB
|
|---|
| 14 | #define BOOST_TEST_DYN_LINK
|
|---|
| 15 | #include <boost/test/unit_test.hpp>
|
|---|
| 16 | #else
|
|---|
| 17 | #include <boost/test/included/unit_test.hpp>
|
|---|
| 18 | #endif
|
|---|
| 19 |
|
|---|
| 20 | #include <boost/test/framework.hpp>
|
|---|
| 21 | #include <boost/test/detail/unit_test_parameters.hpp>
|
|---|
| 22 | #include <boost/test/impl/unit_test_main.ipp>
|
|---|
| 23 |
|
|---|
| 24 | #ifdef BOOST_TEST_ALTERNATIVE_INIT_API
|
|---|
| 25 | bool init_unit_test()
|
|---|
| 26 | #else
|
|---|
| 27 | ::boost::unit_test::test_suite* init_unit_test_suite(int argc, char* argv[])
|
|---|
| 28 | #endif
|
|---|
| 29 | {
|
|---|
| 30 | boost::unit_test::framework::master_test_suite().p_name.value = "VMG Test Suite";
|
|---|
| 31 | #ifdef BOOST_TEST_ALTERNATIVE_INIT_API
|
|---|
| 32 | return true;
|
|---|
| 33 | #else
|
|---|
| 34 | return NULL;
|
|---|
| 35 | #endif
|
|---|
| 36 | }
|
|---|
| 37 |
|
|---|
| 38 | int BOOST_TEST_CALL_DECL
|
|---|
| 39 | main(int argc, char* argv[])
|
|---|
| 40 | {
|
|---|
| 41 | #ifdef HAVE_MPI
|
|---|
| 42 | MPI_Init(&argc, &argv);
|
|---|
| 43 | #endif
|
|---|
| 44 |
|
|---|
| 45 | // prototype for user's unit test init function
|
|---|
| 46 | #ifdef BOOST_TEST_ALTERNATIVE_INIT_API
|
|---|
| 47 | boost::unit_test::init_unit_test_func init_func = &init_unit_test;
|
|---|
| 48 | #else
|
|---|
| 49 | boost::unit_test::init_unit_test_func init_func = &init_unit_test_suite;
|
|---|
| 50 | #endif
|
|---|
| 51 |
|
|---|
| 52 | int rval = ::boost::unit_test::unit_test_main(init_func, argc, argv);
|
|---|
| 53 |
|
|---|
| 54 | #ifdef HAVE_MPI
|
|---|
| 55 | MPI_Finalize();
|
|---|
| 56 | #endif
|
|---|
| 57 |
|
|---|
| 58 | return rval;
|
|---|
| 59 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.