unit_test_init_cleanup.hpp 727 Bytes
Newer Older
incardon's avatar
incardon committed
1 2 3 4 5 6 7 8 9 10
/*
 * unit_test_init_cleanup.hpp
 *
 *  Created on: Apr 17, 2015
 *      Author: Pietro Incardona
 */

#ifndef UNIT_TEST_INIT_CLEANUP_HPP_
#define UNIT_TEST_INIT_CLEANUP_HPP_

incardon's avatar
incardon committed
11
#include "VCluster/VCluster.hpp"
incardon's avatar
incardon committed
12 13

struct ut_start {
14
    ut_start()   {
Pietro Incardona's avatar
Pietro Incardona committed
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
    }

Pietro Incardona's avatar
Pietro Incardona committed
19
    ~ut_start()  { BOOST_TEST_MESSAGE("Delete global VClster");
20
                   openfpm_finalize(); }
incardon's avatar
incardon committed
21 22 23 24 25 26 27 28 29
};

//____________________________________________________________________________//

BOOST_GLOBAL_FIXTURE( ut_start );



#endif /* UNIT_TEST_INIT_CLEANUP_HPP_ */