mirror of
https://github.com/nlohmann/json
synced 2024-11-30 07:30:06 +00:00
fixed build
This commit is contained in:
parent
e64dc532ab
commit
9355dce063
@ -7551,17 +7551,17 @@ TEST_CASE("iterator_wrapper")
|
|||||||
{
|
{
|
||||||
SECTION("objects")
|
SECTION("objects")
|
||||||
{
|
{
|
||||||
|
std::stringstream ss;
|
||||||
json j_object = {{"key1", 1}, {"key2", 2}};
|
json j_object = {{"key1", 1}, {"key2", 2}};
|
||||||
for (auto it : json::iterator_wrapper(j_object))
|
for (auto it : json::iterator_wrapper(j_object))
|
||||||
{
|
{
|
||||||
CHECK((it.first == json("key1") or it.first == json("key2")));
|
ss << it.first << ' ';
|
||||||
CHECK((it.key() == json("key1") or it.key() == json("key2")));
|
ss << it.key() << ' ';
|
||||||
CHECK(it.key() == it.first);
|
ss << it.second << ' ';
|
||||||
|
ss << it.value() << ' ';
|
||||||
CHECK((it.second == json(1) or it.second == json(2)));
|
|
||||||
CHECK((it.value() == json(1) or it.value() == json(2)));
|
|
||||||
CHECK(it.value() == it.second);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CHECK(ss.str() == "key1 key1 1 1 key2 key2 2 2 ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user