Improve tests

This commit is contained in:
David Allemang
2022-09-13 22:22:34 -04:00
parent c47c6262c0
commit cd435dcf54
6 changed files with 359 additions and 233 deletions

View File

@@ -1,35 +1,28 @@
#add_executable(grouptests grouptest.cpp)
#target_link_libraries(grouptests PUBLIC tc)
function(add_simple_test exec arg)
add_test(NAME "${exec}_${arg}" COMMAND ${exec} ${arg})
set_tests_properties("${exec}_${arg}" PROPERTIES TIMEOUT 5)
endfunction()
add_executable(tctests tctest.cpp)
target_link_libraries(tctests PUBLIC tc)
add_executable(test_pair_map test_pair_map.cpp)
target_link_libraries(test_pair_map PUBLIC tc)
add_simple_test(test_pair_map populate)
add_simple_test(test_pair_map symmetry)
add_simple_test(test_pair_map fill)
add_simple_test(test_pair_map copy)
add_simple_test(test_pair_map move)
add_simple_test(test_pair_map iterate)
add_simple_test(test_pair_map iterate_ref)
add_simple_test(test_pair_map view)
#add_test(NAME GroupIterateRef COMMAND grouptests iterate_ref)
#set_tests_properties(GroupIterateRef PROPERTIES TIMEOUT 30)
#add_test(NAME GroupIterateConst COMMAND grouptests iterate_const)
#set_tests_properties(GroupIterateConst PROPERTIES TIMEOUT 30)
#add_test(NAME GroupIterate COMMAND grouptests iterate)
#set_tests_properties(GroupIterate PROPERTIES TIMEOUT 30)
#add_test(NAME GroupView COMMAND grouptests view)
#set_tests_properties(GroupView PROPERTIES TIMEOUT 30)
add_test(NAME SolveA COMMAND tctests A)
set_tests_properties(SolveA PROPERTIES TIMEOUT 5)
add_test(NAME SolveB COMMAND tctests B)
set_tests_properties(SolveB PROPERTIES TIMEOUT 5)
add_test(NAME SolveD COMMAND tctests D)
set_tests_properties(SolveD PROPERTIES TIMEOUT 5)
add_test(NAME SolveE COMMAND tctests E)
set_tests_properties(SolveE PROPERTIES TIMEOUT 5)
add_test(NAME SolveF COMMAND tctests F)
set_tests_properties(SolveF PROPERTIES TIMEOUT 5)
add_test(NAME SolveG COMMAND tctests G)
set_tests_properties(SolveG PROPERTIES TIMEOUT 5)
add_test(NAME SolveH COMMAND tctests H)
set_tests_properties(SolveH PROPERTIES TIMEOUT 5)
add_test(NAME SolveI COMMAND tctests I)
set_tests_properties(SolveI PROPERTIES TIMEOUT 5)
add_test(NAME SolveT COMMAND tctests T)
set_tests_properties(SolveT PROPERTIES TIMEOUT 5)
add_custom_target(alltests DEPENDS grouptests tctests)
add_executable(test_solve test_solve.cpp)
target_link_libraries(test_solve PUBLIC tc)
add_simple_test(test_solve A)
add_simple_test(test_solve B)
add_simple_test(test_solve D)
add_simple_test(test_solve E)
add_simple_test(test_solve F)
add_simple_test(test_solve G)
add_simple_test(test_solve H)
add_simple_test(test_solve I)
add_simple_test(test_solve T)
add_simple_test(test_solve X)