Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
92ef1969
Unverified
Commit
92ef1969
authored
Jun 06, 2017
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✏
cleanup after #598
parent
bfdf0d1c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
50 deletions
+51
-50
README.md
README.md
+1
-0
unit-iterators1.cpp
test/src/unit-iterators1.cpp
+50
-50
No files found.
README.md
View file @
92ef1969
...
@@ -840,6 +840,7 @@ I deeply appreciate the help of the following people.
...
@@ -840,6 +840,7 @@ I deeply appreciate the help of the following people.
- [tinloaf](https://github.com/tinloaf) made sure all pushed warnings are properly popped.
- [tinloaf](https://github.com/tinloaf) made sure all pushed warnings are properly popped.
- [Fytch](https://github.com/Fytch) found a bug in the documentation.
- [Fytch](https://github.com/Fytch) found a bug in the documentation.
- [Jay Sistar](https://github.com/Type1J) implemented a Meson build description
- [Jay Sistar](https://github.com/Type1J) implemented a Meson build description
- [Henry Lee](https://github.com/HenryRLee) fixed a warning in ICC
Thanks a lot for helping out! Please [let me know](mailto:mail@nlohmann.me) if I forgot someone.
Thanks a lot for helping out! Please [let me know](mailto:mail@nlohmann.me) if I forgot someone.
...
...
test/src/unit-iterators1.cpp
View file @
92ef1969
...
@@ -1513,70 +1513,70 @@ TEST_CASE("iterators 1")
...
@@ -1513,70 +1513,70 @@ TEST_CASE("iterators 1")
}
}
SECTION
(
"conversion from iterator to const iterator"
)
SECTION
(
"conversion from iterator to const iterator"
)
{
{
SECTION
(
"boolean"
)
SECTION
(
"boolean"
)
{
{
json
j
=
true
;
json
j
=
true
;
json
::
const_iterator
it
=
j
.
begin
();
json
::
const_iterator
it
=
j
.
begin
();
CHECK
(
it
==
j
.
cbegin
());
CHECK
(
it
==
j
.
cbegin
());
it
=
j
.
begin
();
it
=
j
.
begin
();
CHECK
(
it
==
j
.
cbegin
());
CHECK
(
it
==
j
.
cbegin
());
}
}
SECTION
(
"string"
)
SECTION
(
"string"
)
{
{
json
j
=
"hello world"
;
json
j
=
"hello world"
;
json
::
const_iterator
it
=
j
.
begin
();
json
::
const_iterator
it
=
j
.
begin
();
CHECK
(
it
==
j
.
cbegin
());
CHECK
(
it
==
j
.
cbegin
());
it
=
j
.
begin
();
it
=
j
.
begin
();
CHECK
(
it
==
j
.
cbegin
());
CHECK
(
it
==
j
.
cbegin
());
}
}
SECTION
(
"array"
)
SECTION
(
"array"
)
{
{
json
j
=
{
1
,
2
,
3
};
json
j
=
{
1
,
2
,
3
};
json
::
const_iterator
it
=
j
.
begin
();
json
::
const_iterator
it
=
j
.
begin
();
CHECK
(
it
==
j
.
cbegin
());
CHECK
(
it
==
j
.
cbegin
());
it
=
j
.
begin
();
it
=
j
.
begin
();
CHECK
(
it
==
j
.
cbegin
());
CHECK
(
it
==
j
.
cbegin
());
}
}
SECTION
(
"object"
)
SECTION
(
"object"
)
{
{
json
j
=
{{
"A"
,
1
},
{
"B"
,
2
},
{
"C"
,
3
}};
json
j
=
{{
"A"
,
1
},
{
"B"
,
2
},
{
"C"
,
3
}};
json
::
const_iterator
it
=
j
.
begin
();
json
::
const_iterator
it
=
j
.
begin
();
CHECK
(
it
==
j
.
cbegin
());
CHECK
(
it
==
j
.
cbegin
());
it
=
j
.
begin
();
it
=
j
.
begin
();
CHECK
(
it
==
j
.
cbegin
());
CHECK
(
it
==
j
.
cbegin
());
}
}
SECTION
(
"number (integer)"
)
SECTION
(
"number (integer)"
)
{
{
json
j
=
23
;
json
j
=
23
;
json
::
const_iterator
it
=
j
.
begin
();
json
::
const_iterator
it
=
j
.
begin
();
CHECK
(
it
==
j
.
cbegin
());
CHECK
(
it
==
j
.
cbegin
());
it
=
j
.
begin
();
it
=
j
.
begin
();
CHECK
(
it
==
j
.
cbegin
());
CHECK
(
it
==
j
.
cbegin
());
}
}
SECTION
(
"number (unsigned)"
)
SECTION
(
"number (unsigned)"
)
{
{
json
j
=
23u
;
json
j
=
23u
;
json
::
const_iterator
it
=
j
.
begin
();
json
::
const_iterator
it
=
j
.
begin
();
CHECK
(
it
==
j
.
cbegin
());
CHECK
(
it
==
j
.
cbegin
());
it
=
j
.
begin
();
it
=
j
.
begin
();
CHECK
(
it
==
j
.
cbegin
());
CHECK
(
it
==
j
.
cbegin
());
}
}
SECTION
(
"number (float)"
)
SECTION
(
"number (float)"
)
{
{
json
j
=
23.42
;
json
j
=
23.42
;
json
::
const_iterator
it
=
j
.
begin
();
json
::
const_iterator
it
=
j
.
begin
();
CHECK
(
it
==
j
.
cbegin
());
CHECK
(
it
==
j
.
cbegin
());
it
=
j
.
begin
();
it
=
j
.
begin
();
CHECK
(
it
==
j
.
cbegin
());
CHECK
(
it
==
j
.
cbegin
());
}
}
SECTION
(
"null"
)
SECTION
(
"null"
)
{
{
json
j
=
nullptr
;
json
j
=
nullptr
;
json
::
const_iterator
it
=
j
.
begin
();
json
::
const_iterator
it
=
j
.
begin
();
CHECK
(
it
==
j
.
cbegin
());
CHECK
(
it
==
j
.
cbegin
());
it
=
j
.
begin
();
it
=
j
.
begin
();
CHECK
(
it
==
j
.
cbegin
());
CHECK
(
it
==
j
.
cbegin
());
}
}
}
}
}
}
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