Adding unit test and refactoring

Added unit test for errormanager and refactored to simplify use of error_check() method.
This commit is contained in:
Michael Tryby
2019-03-20 15:43:27 -04:00
parent 01eb164fdc
commit 7eadbc25ce
5 changed files with 141 additions and 36 deletions

18
tests/util/CMakeLists.txt Normal file
View File

@@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 3.12)
enable_testing()
set (Boost_USE_STATIC_LIBS OFF)
find_package(Boost COMPONENTS unit_test_framework)
include_directories (${Boost_INCLUDE_DIRS} ../../src/)
set (test_source
./test_errormanager.cpp
../../src/util/errormanager.c
)
add_executable(test_errormanager ${test_source})
target_link_libraries(test_errormanager ${Boost_LIBRARIES})