提交 98af0887 编写于 作者: N Niels

+ more test cases

上级 ea85da8a
......@@ -477,11 +477,6 @@ const std::string JSON::toString() const noexcept
{
switch (_type)
{
case (value_type::null):
{
return "null";
}
case (value_type::string):
{
return std::string("\"") + *_value.string + "\"";
......@@ -533,6 +528,12 @@ const std::string JSON::toString() const noexcept
return "{" + result + "}";
}
// actually only value_type::null - but making the compiler happy
default:
{
return "null";
}
}
}
......
......@@ -1394,6 +1394,21 @@ TEST_CASE("Iterators")
JSON::iterator tmp1(j7.begin());
JSON::const_iterator tmp2(j7.cbegin());
}
{
JSON j_array = {0, 1, 2, 3, 4, 5};
JSON::iterator i1 = j_array.begin();
++i1;
JSON::iterator i2(i1);
JSON::iterator i3;
i3 = i2;
JSON::const_iterator i4 = j_array.begin();
++i4;
JSON::const_iterator i5(i4);
JSON::const_iterator i6;
i6 = i5;
}
// iterator copy assignment
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册