mirror of
https://github.com/nlohmann/json.git
synced 2026-02-21 19:06:27 +00:00
improved test coverage
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user