forked from bblanchon/ArduinoJson
Fixed JsonVariant::isNull()
not returning true
after set((char*)0)
This commit is contained in:
@ -64,3 +64,11 @@ TEST_CASE("Invalid JSON string") {
|
||||
REQUIRE(deserializeJson(doc, input) == DeserializationError::InvalidInput);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("Not enough room to duplicate the string") {
|
||||
DynamicJsonDocument doc(4);
|
||||
|
||||
REQUIRE(deserializeJson(doc, "\"hello world!\"") ==
|
||||
DeserializationError::NoMemory);
|
||||
REQUIRE(doc.isNull() == true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user