forked from bblanchon/ArduinoJson
Instead of storing a pointer, the function copies the `VariantData`. Benefits: * smaller code * no impact on programs that don't use this feature Drawbacks: * changes to the original variant are not always reflected on the copy * modifying the original from the shallow copy leads to UB
36 lines
509 B
CMake
36 lines
509 B
CMake
# ArduinoJson - https://arduinojson.org
|
|
# Copyright © 2014-2022, Benoit BLANCHON
|
|
# MIT License
|
|
|
|
add_executable(JsonVariantTests
|
|
add.cpp
|
|
as.cpp
|
|
clear.cpp
|
|
compare.cpp
|
|
containsKey.cpp
|
|
converters.cpp
|
|
copy.cpp
|
|
createNested.cpp
|
|
is.cpp
|
|
isnull.cpp
|
|
memoryUsage.cpp
|
|
misc.cpp
|
|
nesting.cpp
|
|
or.cpp
|
|
overflow.cpp
|
|
remove.cpp
|
|
set.cpp
|
|
shallowCopy.cpp
|
|
size.cpp
|
|
subscript.cpp
|
|
types.cpp
|
|
unbound.cpp
|
|
)
|
|
|
|
add_test(JsonVariant JsonVariantTests)
|
|
|
|
set_tests_properties(JsonVariant
|
|
PROPERTIES
|
|
LABELS "Catch"
|
|
)
|