Simplified JsonVariant::as<T>() to always return T

This commit is contained in:
Benoit Blanchon
2021-03-08 09:58:09 +01:00
parent 9094179856
commit e4ce75e20c
16 changed files with 78 additions and 81 deletions

View File

@ -182,8 +182,8 @@ TEST_CASE("deserialize JSON object") {
REQUIRE(err == DeserializationError::Ok);
REQUIRE(doc.is<JsonObject>());
REQUIRE(obj.size() == 2);
REQUIRE(obj["key1"].as<char*>() == 0);
REQUIRE(obj["key2"].as<char*>() == 0);
REQUIRE(obj["key1"].as<const char*>() == 0);
REQUIRE(obj["key2"].as<const char*>() == 0);
}
SECTION("Array") {