🔨 added user-defined exceptions 205-206
This commit is contained in:
parent
875b2da95d
commit
a4274d7766
6 changed files with 102 additions and 98 deletions
|
|
@ -1106,13 +1106,15 @@ TEST_CASE("constructors")
|
|||
{
|
||||
{
|
||||
json j;
|
||||
CHECK_THROWS_AS(json(j.begin(), j.end()), std::domain_error);
|
||||
CHECK_THROWS_WITH(json(j.begin(), j.end()), "cannot use construct with iterators from null");
|
||||
CHECK_THROWS_AS(json(j.begin(), j.end()), json::invalid_iterator);
|
||||
CHECK_THROWS_WITH(json(j.begin(), j.end()),
|
||||
"[json.exception.invalid_iterator.206] cannot construct with iterators from null");
|
||||
}
|
||||
{
|
||||
json j;
|
||||
CHECK_THROWS_AS(json(j.cbegin(), j.cend()), std::domain_error);
|
||||
CHECK_THROWS_WITH(json(j.cbegin(), j.cend()), "cannot use construct with iterators from null");
|
||||
CHECK_THROWS_AS(json(j.cbegin(), j.cend()), json::invalid_iterator);
|
||||
CHECK_THROWS_WITH(json(j.cbegin(), j.cend()),
|
||||
"[json.exception.invalid_iterator.206] cannot construct with iterators from null");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue