Added deprecated attribute on asArray(), asObject() and asString() (issue #420)

This commit is contained in:
Benoit Blanchon
2017-01-22 17:24:17 +01:00
parent d4f725d1fa
commit 5fefeae404
14 changed files with 101 additions and 60 deletions

View File

@ -85,7 +85,6 @@ TEST_(StoreArray) {
_object["hello"] = arr;
EXPECT_EQ(&arr, &_object["hello"].asArray()); // <- DEPRECATED
EXPECT_EQ(&arr, &_object["hello"].as<JsonArray&>());
EXPECT_EQ(&arr, &_object["hello"].as<JsonArray>()); // <- short hand
EXPECT_EQ(&arr, &_object["hello"].as<const JsonArray&>());
@ -102,7 +101,6 @@ TEST_(StoreObject) {
_object["hello"] = obj;
EXPECT_EQ(&obj, &_object["hello"].asObject()); // DEPRECATED
EXPECT_EQ(&obj, &_object["hello"].as<JsonObject&>());
EXPECT_EQ(&obj, &_object["hello"].as<JsonObject>()); // <- short hand
EXPECT_EQ(&obj, &_object["hello"].as<const JsonObject&>());