Added JsonArrayConst, JsonObjectConst, and JsonVariantConst

This commit is contained in:
Benoit Blanchon
2018-10-12 12:00:27 +02:00
parent d1003ff6c9
commit b0560cbd99
47 changed files with 1909 additions and 1063 deletions

View File

@ -27,4 +27,11 @@ TEST_CASE("JsonObject::get()") {
REQUIRE(std::string("world") == obj.get<char*>(vla));
}
#endif
SECTION("works on JsonObjectConst") {
obj.set("hello", "world");
const char* value =
static_cast<JsonObjectConst>(obj).get<const char*>("hello");
REQUIRE_THAT(value, Equals("world"));
}
}