mirror of
https://github.com/eosswedenorg/libantelope
synced 2026-06-18 20:40:03 +02:00
tests: Adding doctest framework.
This commit is contained in:
parent
35c2c2fe79
commit
dbbdc896e1
6 changed files with 7125 additions and 53 deletions
|
|
@ -1,13 +1,17 @@
|
|||
|
||||
function(test name)
|
||||
add_executable(${name}_test ${name}.cpp)
|
||||
target_link_libraries(${name}_test PRIVATE ${LIB_NAME})
|
||||
set(TEST_SRC
|
||||
main.cpp
|
||||
|
||||
# define tests
|
||||
add_test(
|
||||
NAME ${name}_test
|
||||
COMMAND $<TARGET_FILE:${name}_test>
|
||||
)
|
||||
endfunction()
|
||||
# Base58
|
||||
base58/encode.cpp
|
||||
base58/is_base58.cpp
|
||||
)
|
||||
|
||||
add_subdirectory( base58 )
|
||||
add_executable(doctest ${TEST_SRC})
|
||||
target_link_libraries(doctest PRIVATE ${LIB_NAME})
|
||||
target_include_directories(doctest PRIVATE ${CMAKE_CURRENT_LIST_DIR}/include)
|
||||
|
||||
add_test(
|
||||
NAME doctest
|
||||
COMMAND $<TARGET_FILE:doctest> -ni -fc
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue