🔨 added user-defined exceptions 301

This commit is contained in:
Niels Lohmann
2017-03-05 18:40:09 +01:00
parent 0c40c8e3be
commit 068c7acda9
3 changed files with 10 additions and 10 deletions

View File

@@ -943,9 +943,9 @@ TEST_CASE("constructors")
SECTION("object with error")
{
CHECK_THROWS_AS(json::object({ {"one", 1}, {"two", 1u}, {"three", 2.2}, {"four", false}, 13 }),
std::logic_error);
json::type_error);
CHECK_THROWS_WITH(json::object({ {"one", 1}, {"two", 1u}, {"three", 2.2}, {"four", false}, 13 }),
"cannot create object from initializer list");
"[json.exception.type_error.301] cannot create object from initializer list");
}
SECTION("empty array")