Fix call of overloaded 'String(const char*, int)' is ambiguous

This commit is contained in:
Benoit Blanchon
2022-02-17 10:47:42 +01:00
parent ef8379df1b
commit a880614a75
15 changed files with 47 additions and 31 deletions

View File

@ -141,13 +141,13 @@ TEST_CASE("JsonObject::operator[]") {
}
SECTION("should duplicate a non-static JsonString key") {
obj[JsonString("hello", false)] = "world";
obj[JsonString("hello", JsonString::Copied)] = "world";
const size_t expectedSize = JSON_OBJECT_SIZE(1) + JSON_STRING_SIZE(5);
REQUIRE(expectedSize == doc.memoryUsage());
}
SECTION("should not duplicate a static JsonString key") {
obj[JsonString("hello", true)] = "world";
obj[JsonString("hello", JsonString::Linked)] = "world";
const size_t expectedSize = JSON_OBJECT_SIZE(1);
REQUIRE(expectedSize == doc.memoryUsage());
}