mirror of
https://github.com/nlohmann/json.git
synced 2026-10-11 08:57:15 +00:00
Use a named document in the dump test: root() of a temporary does not compile
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
1 file changed
+2
-1
@@ -1427,7 +1427,8 @@ TEST_CASE("json_view dump")
|
|||||||
many_tokens += (i != 0 ? "," : "") + token;
|
many_tokens += (i != 0 ? "," : "") + token;
|
||||||
}
|
}
|
||||||
many_tokens += ']';
|
many_tokens += ']';
|
||||||
CHECK(json_document::parse(many_tokens).root().dump() == json::parse(many_tokens).dump());
|
const json_document many_doc = json_document::parse(many_tokens);
|
||||||
|
CHECK(many_doc.root().dump() == json::parse(many_tokens).dump());
|
||||||
}
|
}
|
||||||
|
|
||||||
// random doubles, written as parse() and dump() would
|
// random doubles, written as parse() and dump() would
|
||||||
|
|||||||
Reference in new issue
Block a user