From 5dec602a209956a0820b2934449fde684c881caa Mon Sep 17 00:00:00 2001 From: Pietro Incardona <incardon@mpi-cbg.de> Date: Wed, 2 Jan 2019 23:43:08 +0100 Subject: [PATCH] Fixing boost unit test --- main.cpp | 8 -------- src/main.cpp | 17 +++++++++++++++-- 2 files changed, 15 insertions(+), 10 deletions(-) delete mode 100755 main.cpp diff --git a/main.cpp b/main.cpp deleted file mode 100755 index 836632f..0000000 --- a/main.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include <iostream> - -#include "config.h" -#define BOOST_TEST_MODULE "C++ test module for OpenFPM_data project" -#include <boost/test/included/unit_test.hpp> - -#include "memory/HeapMemory_unit_tests.hpp" - diff --git a/src/main.cpp b/src/main.cpp index 02c7bda..f234a32 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,19 @@ #include <iostream> -#define BOOST_TEST_MODULE "C++ test module for OpenFPM_data project" -#include <boost/test/included/unit_test.hpp> + +#define BOOST_TEST_DYN_LINK +#include <boost/test/unit_test.hpp> + +// initialization function: +bool init_unit_test() +{ + return true; +} + +// entry point: +int main(int argc, char* argv[]) +{ + return boost::unit_test::unit_test_main( &init_unit_test, argc, argv ); +} #include "config.h" #include "memory/Memory_unit_tests.hpp" -- GitLab