mirror of
https://github.com/nlohmann/json.git
synced 2026-10-12 01:17:14 +00:00
Build the image link test without exceptions
load_result() exists only with exceptions; with JSON_NOEXCEPTION the test loads the image with the check directly (a failed check aborts). Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
1 file changed
+5
@@ -487,7 +487,12 @@ TEST_CASE("json_view images: edited documents")
|
|||||||
image_check::full, image_check::bounds
|
image_check::full, image_check::bounds
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
|
#if !defined(JSON_NOEXCEPTION)
|
||||||
CHECK(load_result(image, check).empty());
|
CHECK(load_result(image, check).empty());
|
||||||
|
#else
|
||||||
|
const json_document loaded = json_document::load(image, check);
|
||||||
|
CHECK(loaded.root().dump() == d.root().dump());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
check_round_trip(d);
|
check_round_trip(d);
|
||||||
// a loaded document is edited and saved again
|
// a loaded document is edited and saved again
|
||||||
|
|||||||
Reference in new issue
Block a user