Added JsonArrayConst, JsonObjectConst, and JsonVariantConst

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

No files matched your search

+7
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"));
}
}