Commit 36f14d21 authored by Niels's avatar Niels

more test cases for reverse iterators

parent c22ee3f2
...@@ -221,6 +221,14 @@ TEST_CASE("array") ...@@ -221,6 +221,14 @@ TEST_CASE("array")
} }
} }
} }
{
for (json::const_reverse_iterator it = j1.rbegin(); it != j1.crend(); ++it)
{
}
for (json::reverse_iterator it = j1.rbegin(); it != j1.rend(); ++it)
{
}
}
{ {
// const_iterator with cbegin/cend // const_iterator with cbegin/cend
for (json::const_iterator cit = j1.cbegin(); cit != j1.cend(); ++cit) for (json::const_iterator cit = j1.cbegin(); cit != j1.cend(); ++cit)
...@@ -661,10 +669,6 @@ TEST_CASE("object") ...@@ -661,10 +669,6 @@ TEST_CASE("object")
{ {
} }
for (json::const_reverse_iterator it = j1.crbegin(); it != j1.crend(); ++it)
{
}
// range-based for // range-based for
for (auto& element : j1) for (auto& element : j1)
{ {
...@@ -696,6 +700,10 @@ TEST_CASE("object") ...@@ -696,6 +700,10 @@ TEST_CASE("object")
CHECK(it->type() == json::value_t::number); CHECK(it->type() == json::value_t::number);
} }
for (json::const_reverse_iterator it = j1.crbegin(); it != j1.crend(); ++it)
{
}
// const_iterator using cbegin/cend // const_iterator using cbegin/cend
for (json::const_iterator it = j1.cbegin(); it != j1.cend(); ++it) for (json::const_iterator it = j1.cbegin(); it != j1.cend(); ++it)
{ {
......
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