improved test coverage

This commit is contained in:
Niels 2016-05-07 18:33:43 +02:00
parent ea84a85b13
commit c04275966f
4 changed files with 11 additions and 3 deletions

View file

@ -12094,6 +12094,12 @@ TEST_CASE("JSON pointers")
CHECK_THROWS_AS(json::json_pointer("/~"), std::domain_error);
CHECK_THROWS_WITH(json::json_pointer("/~"), "escape error: '~' must be followed with '0' or '1'");
json::json_pointer p;
CHECK_THROWS_AS(p.top(), std::domain_error);
CHECK_THROWS_WITH(p.top(), "JSON pointer has no parent");
CHECK_THROWS_AS(p.pop_back(), std::domain_error);
CHECK_THROWS_WITH(p.pop_back(), "JSON pointer has no parent");
}
SECTION("examples from RFC 6901")