Skip to content

Commit

Permalink
✏️ cleanup after #598
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Jun 6, 2017
1 parent bfdf0d1 commit 92ef196
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 50 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
- [Fytch](https://github.com/Fytch) found a bug in the documentation.
- [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.
Expand Down
100 changes: 50 additions & 50 deletions test/src/unit-iterators1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1513,70 +1513,70 @@ TEST_CASE("iterators 1")
}

SECTION("conversion from iterator to const iterator")
{
{
SECTION("boolean")
{
{
json j = true;
json::const_iterator it = j.begin();
CHECK(it == j.cbegin());
it = j.begin();
CHECK(it == j.cbegin());
}
json::const_iterator it = j.begin();
CHECK(it == j.cbegin());
it = j.begin();
CHECK(it == j.cbegin());
}
SECTION("string")
{
{
json j = "hello world";
json::const_iterator it = j.begin();
CHECK(it == j.cbegin());
it = j.begin();
CHECK(it == j.cbegin());
}
json::const_iterator it = j.begin();
CHECK(it == j.cbegin());
it = j.begin();
CHECK(it == j.cbegin());
}
SECTION("array")
{
{
json j = {1, 2, 3};
json::const_iterator it = j.begin();
CHECK(it == j.cbegin());
it = j.begin();
CHECK(it == j.cbegin());
}
json::const_iterator it = j.begin();
CHECK(it == j.cbegin());
it = j.begin();
CHECK(it == j.cbegin());
}
SECTION("object")
{
{
json j = {{"A", 1}, {"B", 2}, {"C", 3}};
json::const_iterator it = j.begin();
CHECK(it == j.cbegin());
it = j.begin();
CHECK(it == j.cbegin());
}
json::const_iterator it = j.begin();
CHECK(it == j.cbegin());
it = j.begin();
CHECK(it == j.cbegin());
}
SECTION("number (integer)")
{
{
json j = 23;
json::const_iterator it = j.begin();
CHECK(it == j.cbegin());
it = j.begin();
CHECK(it == j.cbegin());
}
json::const_iterator it = j.begin();
CHECK(it == j.cbegin());
it = j.begin();
CHECK(it == j.cbegin());
}
SECTION("number (unsigned)")
{
{
json j = 23u;
json::const_iterator it = j.begin();
CHECK(it == j.cbegin());
it = j.begin();
CHECK(it == j.cbegin());
}
json::const_iterator it = j.begin();
CHECK(it == j.cbegin());
it = j.begin();
CHECK(it == j.cbegin());
}
SECTION("number (float)")
{
{
json j = 23.42;
json::const_iterator it = j.begin();
CHECK(it == j.cbegin());
it = j.begin();
CHECK(it == j.cbegin());
}
json::const_iterator it = j.begin();
CHECK(it == j.cbegin());
it = j.begin();
CHECK(it == j.cbegin());
}
SECTION("null")
{
{
json j = nullptr;
json::const_iterator it = j.begin();
CHECK(it == j.cbegin());
it = j.begin();
CHECK(it == j.cbegin());
}
}
json::const_iterator it = j.begin();
CHECK(it == j.cbegin());
it = j.begin();
CHECK(it == j.cbegin());
}
}
}

0 comments on commit 92ef196

Please sign in to comment.