Add more tests
This commit is contained in:
parent
932b593a58
commit
905251e586
4 changed files with 290 additions and 74 deletions
|
|
@ -7,28 +7,35 @@ FetchContent_Declare(
|
|||
)
|
||||
FetchContent_MakeAvailable(Unity)
|
||||
|
||||
add_executable(
|
||||
json_test
|
||||
json_test.c
|
||||
)
|
||||
set_target_properties(
|
||||
json_test
|
||||
PROPERTIES
|
||||
C_STANDARD 23
|
||||
C_STANDARD_REQUIRED ON
|
||||
C_EXTENSIONS OFF
|
||||
)
|
||||
target_link_libraries(
|
||||
json_test
|
||||
PRIVATE
|
||||
json
|
||||
unity::framework
|
||||
)
|
||||
target_include_directories(
|
||||
json_test
|
||||
PRIVATE
|
||||
${CMAKE_SOURCE_DIR}
|
||||
list(
|
||||
APPEND JSON_TESTS
|
||||
json_tests_simple
|
||||
json_tests_array
|
||||
)
|
||||
foreach(JSON_TEST IN LISTS JSON_TESTS)
|
||||
add_executable(
|
||||
${JSON_TEST}
|
||||
${JSON_TEST}.c
|
||||
)
|
||||
set_target_properties(
|
||||
${JSON_TEST}
|
||||
PROPERTIES
|
||||
C_STANDARD 23
|
||||
C_STANDARD_REQUIRED ON
|
||||
C_EXTENSIONS OFF
|
||||
)
|
||||
target_link_libraries(
|
||||
${JSON_TEST}
|
||||
PRIVATE
|
||||
json
|
||||
unity::framework
|
||||
)
|
||||
target_include_directories(
|
||||
${JSON_TEST}
|
||||
PRIVATE
|
||||
${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
|
||||
add_test(NAME json_test COMMAND json_test)
|
||||
add_test(NAME ${JSON_TEST} COMMAND ${JSON_TEST})
|
||||
endforeach()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue