Register C++ tests with CTest
This commit is contained in:
1 parent
24f28dd9c8
commit
7a41d1f647
3 files changed
+18
-5
No files matched your search
@@ -12,6 +12,8 @@ endif()
|
||||
option(CR_BUILD_FUZZERS "Build libFuzzer differential/safety harnesses" ON)
|
||||
option(CR_BUILD_BENCH "Build the nanobench comparison" ON)
|
||||
|
||||
enable_testing()
|
||||
|
||||
add_library(cr_literal STATIC src/literal.cpp)
|
||||
target_include_directories(cr_literal PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
|
||||
@@ -41,6 +43,12 @@ target_include_directories(exhaustive_test PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tests)
|
||||
target_link_libraries(exhaustive_test PRIVATE cr_literal cr_fast)
|
||||
|
||||
set(CR_GOLDEN_VECTORS "${CMAKE_CURRENT_SOURCE_DIR}/oracle/golden.txt")
|
||||
add_test(NAME golden COMMAND golden_test "${CR_GOLDEN_VECTORS}")
|
||||
add_test(NAME diff_corpus COMMAND diff_corpus "${CR_GOLDEN_VECTORS}")
|
||||
add_test(NAME extreme COMMAND extreme_test)
|
||||
add_test(NAME exhaustive COMMAND exhaustive_test)
|
||||
|
||||
if(CR_BUILD_BENCH)
|
||||
add_executable(cr_bench tests/bench.cpp)
|
||||
target_include_directories(cr_bench PRIVATE
|
||||
|
||||
Reference in new issue
Block a user