Commit 708eb961 authored by Théo DELRIEU's avatar Théo DELRIEU

disable reserve tests when exceptions are disabled

parent 889b269a
...@@ -175,6 +175,7 @@ TEST_CASE("value conversion") ...@@ -175,6 +175,7 @@ TEST_CASE("value conversion")
CHECK_THROWS_WITH(json(json::value_t::null).get<std::vector<json>>(), CHECK_THROWS_WITH(json(json::value_t::null).get<std::vector<json>>(),
"type must be array, but is null"); "type must be array, but is null");
#if not defined(JSON_NOEXCEPTION)
SECTION("reserve is called on containers that supports it") SECTION("reserve is called on containers that supports it")
{ {
// making the call to from_json throw in order to check capacity // making the call to from_json throw in order to check capacity
...@@ -182,6 +183,7 @@ TEST_CASE("value conversion") ...@@ -182,6 +183,7 @@ TEST_CASE("value conversion")
CHECK_THROWS_AS(nlohmann::from_json(j, v), std::logic_error); CHECK_THROWS_AS(nlohmann::from_json(j, v), std::logic_error);
CHECK(v.capacity() == j.size()); CHECK(v.capacity() == j.size());
} }
#endif
} }
SECTION("std::deque<json>") SECTION("std::deque<json>")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment