mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-29 10:17:39 +02:00
Reduce boilerplate for failing build tests
This commit is contained in:
@ -2,7 +2,11 @@
|
|||||||
# Copyright © 2014-2024, Benoit BLANCHON
|
# Copyright © 2014-2024, Benoit BLANCHON
|
||||||
# MIT License
|
# MIT License
|
||||||
|
|
||||||
macro(build_should_fail target)
|
macro(add_failing_build source_file)
|
||||||
|
get_filename_component(target ${source_file} NAME_WE)
|
||||||
|
|
||||||
|
add_executable(${target} ${source_file})
|
||||||
|
|
||||||
set_target_properties(${target}
|
set_target_properties(${target}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
EXCLUDE_FROM_ALL TRUE
|
EXCLUDE_FROM_ALL TRUE
|
||||||
@ -20,20 +24,9 @@ macro(build_should_fail target)
|
|||||||
)
|
)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
add_executable(Issue978 Issue978.cpp)
|
add_failing_build(Issue978.cpp)
|
||||||
build_should_fail(Issue978)
|
add_failing_build(read_long_long.cpp)
|
||||||
|
add_failing_build(write_long_long.cpp)
|
||||||
add_executable(read_long_long read_long_long.cpp)
|
add_failing_build(variant_as_char.cpp)
|
||||||
build_should_fail(read_long_long)
|
add_failing_build(assign_char.cpp)
|
||||||
|
add_failing_build(deserialize_object.cpp)
|
||||||
add_executable(write_long_long write_long_long.cpp)
|
|
||||||
build_should_fail(write_long_long)
|
|
||||||
|
|
||||||
add_executable(variant_as_char variant_as_char.cpp)
|
|
||||||
build_should_fail(variant_as_char)
|
|
||||||
|
|
||||||
add_executable(assign_char assign_char.cpp)
|
|
||||||
build_should_fail(assign_char)
|
|
||||||
|
|
||||||
add_executable(deserialize_object deserialize_object.cpp)
|
|
||||||
build_should_fail(deserialize_object)
|
|
||||||
|
Reference in New Issue
Block a user