| 1 | /* |
| 2 | * unit_test_init_cleanup.hpp |
| 3 | * |
| 4 | * Created on: Apr 17, 2015 |
| 5 | * Author: Pietro Incardona |
| 6 | */ |
| 7 | |
| 8 | #ifndef UNIT_TEST_INIT_CLEANUP_HPP_ |
| 9 | #define UNIT_TEST_INIT_CLEANUP_HPP_ |
| 10 | |
| 11 | #include "VCluster/VCluster.hpp" |
| 12 | |
| 13 | struct ut_start { |
| 14 | ut_start() { |
| 15 | BOOST_TEST_MESSAGE("Initialize global VCluster" ); |
| 16 | openfpm_init(&boost::unit_test::framework::master_test_suite().argc,&boost::unit_test::framework::master_test_suite().argv); |
| 17 | } |
| 18 | |
| 19 | ~ut_start() { BOOST_TEST_MESSAGE("Delete global VClster" ); |
| 20 | openfpm_finalize(); } |
| 21 | }; |
| 22 | |
| 23 | //____________________________________________________________________________// |
| 24 | |
| 25 | BOOST_GLOBAL_FIXTURE( ut_start ); |
| 26 | |
| 27 | |
| 28 | |
| 29 | #endif /* UNIT_TEST_INIT_CLEANUP_HPP_ */ |
| 30 | |