degesch: add a unit test for message wrapping algo
This commit is contained in:
@@ -122,6 +122,23 @@ target_link_libraries (degesch ${project_libraries})
|
||||
add_executable (kike kike.c kike-replies.c ${common_sources} ${common_headers})
|
||||
target_link_libraries (kike ${project_libraries})
|
||||
|
||||
# Tests
|
||||
function (make_tests_for target_name)
|
||||
get_target_property (sources ${target_name} SOURCES)
|
||||
get_target_property (libraries ${target_name} LINK_LIBRARIES)
|
||||
|
||||
set (test test-${target_name})
|
||||
add_executable (${test} ${sources})
|
||||
target_link_libraries (${test} ${libraries})
|
||||
add_test (NAME ${test} COMMAND ${test})
|
||||
set_target_properties (${test} PROPERTIES COMPILE_DEFINITIONS TESTING)
|
||||
endfunction (make_tests_for)
|
||||
|
||||
include (CTest)
|
||||
if (BUILD_TESTING)
|
||||
make_tests_for (degesch)
|
||||
endif (BUILD_TESTING)
|
||||
|
||||
# Various clang-based diagnostics, loads of fake positives and spam
|
||||
file (GLOB clang_tidy_sources *.c)
|
||||
set (clang_tidy_checks misc-* readability-*
|
||||
|
||||
Reference in New Issue
Block a user