mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 08:48:30 +01:00
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