Fixed duplication of char*

This commit is contained in:
Benoit Blanchon
2018-08-22 14:37:17 +02:00
parent 7683667b3c
commit 6d290bd001
25 changed files with 601 additions and 531 deletions

View File

@ -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
}