From 708eb9613b24422848b2bee92425fcaf3fc11d31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20DELRIEU?= Date: Sat, 21 Jan 2017 16:35:23 +0100 Subject: [PATCH] disable reserve tests when exceptions are disabled --- test/src/unit-conversions.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/src/unit-conversions.cpp b/test/src/unit-conversions.cpp index 3c4d8bef..994f882d 100644 --- a/test/src/unit-conversions.cpp +++ b/test/src/unit-conversions.cpp @@ -175,6 +175,7 @@ TEST_CASE("value conversion") CHECK_THROWS_WITH(json(json::value_t::null).get>(), "type must be array, but is null"); +#if not defined(JSON_NOEXCEPTION) SECTION("reserve is called on containers that supports it") { // making the call to from_json throw in order to check capacity @@ -182,6 +183,7 @@ TEST_CASE("value conversion") CHECK_THROWS_AS(nlohmann::from_json(j, v), std::logic_error); CHECK(v.capacity() == j.size()); } +#endif } SECTION("std::deque")