forked from bblanchon/ArduinoJson
Fixed duplication of char*
This commit is contained in:
@ -39,4 +39,17 @@ TEST_CASE("JsonObject::remove()") {
|
||||
serializeJson(obj, result);
|
||||
REQUIRE("{\"a\":0,\"c\":2}" == result);
|
||||
}
|
||||
|
||||
#ifdef HAS_VARIABLE_LENGTH_ARRAY
|
||||
SECTION("key is a vla") {
|
||||
obj["hello"] = 1;
|
||||
|
||||
int i = 16;
|
||||
char vla[i];
|
||||
strcpy(vla, "hello");
|
||||
obj.remove(vla);
|
||||
|
||||
REQUIRE(0 == obj.size());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user