forked from bblanchon/ArduinoJson
Fixed deserializeJson()
silently accepting a Stream*
(issue #978)
This commit is contained in:
@ -13,3 +13,24 @@ add_executable(MiscTests
|
||||
|
||||
target_link_libraries(MiscTests catch)
|
||||
add_test(Misc MiscTests)
|
||||
|
||||
|
||||
add_executable(Issue978
|
||||
Issue978.cpp
|
||||
)
|
||||
set_target_properties(Issue978
|
||||
PROPERTIES
|
||||
EXCLUDE_FROM_ALL TRUE
|
||||
EXCLUDE_FROM_DEFAULT_BUILD TRUE
|
||||
)
|
||||
add_test(
|
||||
NAME
|
||||
Issue978
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} --build . --target Issue978 --config $<CONFIGURATION>
|
||||
WORKING_DIRECTORY
|
||||
${CMAKE_BINARY_DIR}
|
||||
)
|
||||
set_tests_properties(Issue978
|
||||
PROPERTIES
|
||||
WILL_FAIL TRUE)
|
||||
|
13
test/Misc/Issue978.cpp
Normal file
13
test/Misc/Issue978.cpp
Normal file
@ -0,0 +1,13 @@
|
||||
// ArduinoJson - arduinojson.org
|
||||
// Copyright Benoit Blanchon 2014-2019
|
||||
// MIT License
|
||||
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
struct Stream {};
|
||||
|
||||
int main() {
|
||||
Stream* stream = 0;
|
||||
DynamicJsonDocument doc(1024);
|
||||
deserializeJson(doc, stream);
|
||||
}
|
Reference in New Issue
Block a user