mirror of
https://github.com/nlohmann/json.git
synced 2026-02-09 23:52:15 +00:00
🚸 improve diagnostics
This commit is contained in:
@@ -1877,4 +1877,10 @@ TEST_CASE("parser class")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("error messages for comments")
|
||||
{
|
||||
CHECK_THROWS_WITH_AS(json::parse("/a", nullptr, true, true), "[json.exception.parse_error.101] parse error at line 1, column 2: syntax error while parsing value - invalid comment; expecting '/' or '*' after '/'; last read: '/a'", json::parse_error);
|
||||
CHECK_THROWS_WITH_AS(json::parse("/*", nullptr, true, true), "[json.exception.parse_error.101] parse error at line 1, column 3: syntax error while parsing value - invalid comment; missing closing '*/'; last read: '/*<U+0000>'", json::parse_error);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user