Commit 284dcf3d authored by Milo Yip's avatar Milo Yip

Change MemberEmpty() to ObjectEmpty()

parent dc834c9c
...@@ -748,7 +748,7 @@ public: ...@@ -748,7 +748,7 @@ public:
SizeType MemberCount() const { RAPIDJSON_ASSERT(IsObject()); return data_.o.size; } SizeType MemberCount() const { RAPIDJSON_ASSERT(IsObject()); return data_.o.size; }
//! Check whether the object is empty. //! Check whether the object is empty.
bool MemberEmpty() const { RAPIDJSON_ASSERT(IsObject()); return data_.o.size == 0; } bool ObjectEmpty() const { RAPIDJSON_ASSERT(IsObject()); return data_.o.size == 0; }
//! Get the value associated with the name. //! Get the value associated with the name.
/*! /*!
......
...@@ -763,16 +763,16 @@ TEST(Value, Object) { ...@@ -763,16 +763,16 @@ TEST(Value, Object) {
EXPECT_EQ(kObjectType, x.GetType()); EXPECT_EQ(kObjectType, x.GetType());
EXPECT_TRUE(x.IsObject()); EXPECT_TRUE(x.IsObject());
EXPECT_TRUE(x.MemberEmpty()); EXPECT_TRUE(x.ObjectEmpty());
EXPECT_EQ(0u, x.MemberCount()); EXPECT_EQ(0u, x.MemberCount());
EXPECT_EQ(kObjectType, y.GetType()); EXPECT_EQ(kObjectType, y.GetType());
EXPECT_TRUE(y.IsObject()); EXPECT_TRUE(y.IsObject());
EXPECT_TRUE(y.MemberEmpty()); EXPECT_TRUE(y.ObjectEmpty());
EXPECT_EQ(0u, y.MemberCount()); EXPECT_EQ(0u, y.MemberCount());
// AddMember() // AddMember()
x.AddMember("A", "Apple", allocator); x.AddMember("A", "Apple", allocator);
EXPECT_FALSE(x.MemberEmpty()); EXPECT_FALSE(x.ObjectEmpty());
EXPECT_EQ(1u, x.MemberCount()); EXPECT_EQ(1u, x.MemberCount());
Value value("Banana", 6); Value value("Banana", 6);
...@@ -965,7 +965,7 @@ TEST(Value, Object) { ...@@ -965,7 +965,7 @@ TEST(Value, Object) {
// RemoveAllMembers() // RemoveAllMembers()
x.RemoveAllMembers(); x.RemoveAllMembers();
EXPECT_TRUE(x.MemberEmpty()); EXPECT_TRUE(x.ObjectEmpty());
EXPECT_EQ(0u, x.MemberCount()); EXPECT_EQ(0u, x.MemberCount());
// SetObject() // SetObject()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment