Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
284dcf3d
Commit
284dcf3d
authored
Aug 28, 2014
by
Milo Yip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change MemberEmpty() to ObjectEmpty()
parent
dc834c9c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
document.h
include/rapidjson/document.h
+1
-1
valuetest.cpp
test/unittest/valuetest.cpp
+4
-4
No files found.
include/rapidjson/document.h
View file @
284dcf3d
...
@@ -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
Member
Empty
()
const
{
RAPIDJSON_ASSERT
(
IsObject
());
return
data_
.
o
.
size
==
0
;
}
bool
Object
Empty
()
const
{
RAPIDJSON_ASSERT
(
IsObject
());
return
data_
.
o
.
size
==
0
;
}
//! Get the value associated with the name.
//! Get the value associated with the name.
/*!
/*!
...
...
test/unittest/valuetest.cpp
View file @
284dcf3d
...
@@ -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
.
Member
Empty
());
EXPECT_TRUE
(
x
.
Object
Empty
());
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
.
Member
Empty
());
EXPECT_TRUE
(
y
.
Object
Empty
());
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
.
Member
Empty
());
EXPECT_FALSE
(
x
.
Object
Empty
());
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
.
Member
Empty
());
EXPECT_TRUE
(
x
.
Object
Empty
());
EXPECT_EQ
(
0u
,
x
.
MemberCount
());
EXPECT_EQ
(
0u
,
x
.
MemberCount
());
// SetObject()
// SetObject()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment