🔨 added user-defined exception 311

This commit is contained in:
Niels Lohmann 2017-03-05 22:31:08 +01:00
parent 9e560ca40c
commit 6751d650be
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
3 changed files with 9 additions and 6 deletions

View file

@ -291,8 +291,9 @@ TEST_CASE("modifiers")
SECTION("other type")
{
json j = 1;
CHECK_THROWS_AS(j.emplace_back("Hello"), std::domain_error);
CHECK_THROWS_WITH(j.emplace_back("Hello"), "cannot use emplace_back() with number");
CHECK_THROWS_AS(j.emplace_back("Hello"), json::type_error);
CHECK_THROWS_WITH(j.emplace_back("Hello"),
"[json.exception.type_error.311] cannot use emplace_back() with number");
}
}