deprecate old removeMember()

This commit is contained in:
Christopher Dunn
2015-01-21 16:01:30 -06:00
parent 70b795bd45
commit 76746b09fc
3 changed files with 44 additions and 22 deletions

View File

@@ -202,10 +202,14 @@ JSONTEST_FIXTURE(ValueTest, objects) {
// Remove.
Json::Value got;
got = object1_.removeMember("some other id");
bool did;
did = object1_.removeMember("some other id", &got);
JSONTEST_ASSERT_EQUAL(Json::Value("foo"), got);
got = object1_.removeMember("some other id");
JSONTEST_ASSERT_EQUAL(Json::nullValue, got);
JSONTEST_ASSERT_EQUAL(true, did);
got = Json::Value("bar");
did = object1_.removeMember("some other id", &got);
JSONTEST_ASSERT_EQUAL(Json::Value("bar"), got);
JSONTEST_ASSERT_EQUAL(false, did);
}
JSONTEST_FIXTURE(ValueTest, arrays) {