From 322b4e10db40b3289fcdce4c6cecca8fd920a09c Mon Sep 17 00:00:00 2001 From: Vincent Samy Date: Tue, 23 Oct 2018 10:16:52 +0900 Subject: [PATCH] Preapre files for futre tests --- tests/CMakeLists.txt | 19 +++++++++++++++++++ tests/FilterTest.cpp | 0 2 files changed, 19 insertions(+) create mode 100644 tests/CMakeLists.txt create mode 100644 tests/FilterTest.cpp diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..14caa08 --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,19 @@ +enable_testing() + +set(BOOST_COMPONENTS system unit_test_framework) +search_for_boost() + +add_definitions(-DBOOST_TEST_DYN_LINK) +include_directories(${Boost_INCLUDE_DIRS}) + +macro(addTest testName) + add_executable(${testName} ${testName}.cpp systems.h tools.h) + if(NOT MSVC) + target_link_libraries(${name} PUBLIC ${Boost_LIBRARIES}) + endif(MSVC) + add_test(${testName}Unit ${testName}) + # Adding a project configuration file (for MSVC only) + GENERATE_MSVC_DOT_USER_FILE(${name}) +endmacro(addTest) + +addTest(FilterTest) \ No newline at end of file diff --git a/tests/FilterTest.cpp b/tests/FilterTest.cpp new file mode 100644 index 0000000..e69de29