disable reserve tests when exceptions are disabled

pull/423/head
Théo DELRIEU 2017-01-21 16:35:23 +01:00
parent 889b269a4f
commit 708eb9613b
1 changed files with 2 additions and 0 deletions

View File

@ -175,6 +175,7 @@ TEST_CASE("value conversion")
CHECK_THROWS_WITH(json(json::value_t::null).get<std::vector<json>>(),
"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<json>")