blob: 2dd46b3f155c80fc64d39a7e9e4b187556dc9f77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
function(create_test_list list_name file)
set("TEST_LIST_FILE_${list_name}" ${file} PARENT_SCOPE)
file(WRITE ${file} "#define UNIT_TESTS(XX) \\\n")
file(APPEND ${file} ${TEST_LIST_CONTENT_${list_name}})
file(APPEND ${file} "\n")
endfunction()
function(create_test list_name unit_name test_name)
set(TEST_LIST_CONTENT_${list_name} "${TEST_LIST_CONTENT_${list_name}} XX(${unit_name},${test_name}) \\\n" PARENT_SCOPE)
add_test(NAME "${unit_name}_${test_name}" COMMAND ${TEST_TARGET} ${unit_name} ${test_name})
endfunction()
|