+ more test cases

This commit is contained in:
Niels 2014-12-28 21:53:13 +01:00
parent 8f45d9351e
commit 48a349a058
2 changed files with 18 additions and 5 deletions

View File

@ -325,11 +325,7 @@ const std::string JSON::_typename() const noexcept
{
return "boolean";
}
case (value_type::number):
{
return "number";
}
case (value_type::number_float):
default:
{
return "number";
}

View File

@ -1380,6 +1380,23 @@ TEST_CASE("Iterators")
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")