added line positions to error messages

This is a follow-up to #1210.
This commit is contained in:
Niels Lohmann 2018-10-07 12:27:24 +02:00
parent ac38e95780
commit 011b15dd08
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
13 changed files with 725 additions and 278 deletions

View file

@ -39,7 +39,7 @@ TEST_CASE("JSON pointers")
{
CHECK_THROWS_AS(json::json_pointer("foo"), json::parse_error&);
CHECK_THROWS_WITH(json::json_pointer("foo"),
"[json.exception.parse_error.107] parse error at 1: JSON pointer must be empty or begin with '/' - was: 'foo'");
"[json.exception.parse_error.107] parse error at byte 1: JSON pointer must be empty or begin with '/' - was: 'foo'");
CHECK_THROWS_AS(json::json_pointer("/~~"), json::parse_error&);
CHECK_THROWS_WITH(json::json_pointer("/~~"),