🔨 added user-defined exceptions 2xx

This commit is contained in:
Niels Lohmann
2017-03-03 14:34:57 +01:00
parent a4274d7766
commit 0c40c8e3be
9 changed files with 306 additions and 304 deletions

View File

@@ -240,8 +240,9 @@ TEST_CASE("algorithms")
SECTION("sorting an object")
{
json j({{"one", 1}, {"two", 2}});
CHECK_THROWS_AS(std::sort(j.begin(), j.end()), std::domain_error);
CHECK_THROWS_WITH(std::sort(j.begin(), j.end()), "cannot use offsets with object iterators");
CHECK_THROWS_AS(std::sort(j.begin(), j.end()), json::invalid_iterator);
CHECK_THROWS_WITH(std::sort(j.begin(), j.end()),
"[json.exception.invalid_iterator.209] cannot use offsets with object iterators");
}
}