Commit 48a349a0 by Niels

+ more test cases

parent 8f45d935
...@@ -325,11 +325,7 @@ const std::string JSON::_typename() const noexcept ...@@ -325,11 +325,7 @@ const std::string JSON::_typename() const noexcept
{ {
return "boolean"; return "boolean";
} }
case (value_type::number): default:
{
return "number";
}
case (value_type::number_float):
{ {
return "number"; return "number";
} }
......
...@@ -1380,6 +1380,23 @@ TEST_CASE("Iterators") ...@@ -1380,6 +1380,23 @@ TEST_CASE("Iterators")
JSON::const_iterator tmp2(j7.cbegin()); JSON::const_iterator tmp2(j7.cbegin());
} }
// iterator copy assignment
{
JSON::iterator i1 = j2.begin();
JSON::const_iterator i2 = j2.cbegin();
JSON::iterator i3 = i1;
JSON::const_iterator i4 = i2;
}
// operator++
{
JSON j;
const JSON j_const = j;
for (JSON::iterator i = j.begin(); i != j.end(); ++i);
for (JSON::const_iterator i = j.cbegin(); i != j.cend(); ++i);
for (JSON::const_iterator i = j_const.begin(); i != j_const.end(); ++i);
for (JSON::const_iterator i = j_const.cbegin(); i != j_const.cend(); ++i);
}
} }
TEST_CASE("Comparisons") TEST_CASE("Comparisons")
......
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