Merge branch 'master' into 6.x

This commit is contained in:
Benoit Blanchon
2018-06-04 17:44:10 +02:00
12 changed files with 104 additions and 14 deletions

View File

@ -152,4 +152,15 @@ TEST_CASE("JsonObject::operator[]") {
const size_t expectedSize = JSON_OBJECT_SIZE(1) + 12;
REQUIRE(expectedSize <= doc.memoryUsage());
}
SECTION("should ignore null key") {
// object must have a value to make a call to strcmp()
obj["dummy"] = 42;
const char* null = 0;
obj[null] = 666;
REQUIRE(obj.size() == 1);
REQUIRE(obj[null] == 0);
}
}