mirror of
https://github.com/nlohmann/json.git
synced 2026-10-09 07:57:13 +00:00
More tests to get line coverage backt o 100%
This commit is contained in:
1 parent
7f4fcc51f6
commit
13efc7a02a
1 file changed
+5
@@ -1652,6 +1652,11 @@ TEST_CASE("Parser")
|
||||
CHECK(json::parse("\"a\\nz\"") == json("a\nz"));
|
||||
CHECK(json::parse("\"\\n\"") == json("\n"));
|
||||
|
||||
// escaping senseless stuff
|
||||
CHECK_THROWS_AS(json::parse("\"\\z\""), std::invalid_argument);
|
||||
CHECK_THROWS_AS(json::parse("\"\\ \""), std::invalid_argument);
|
||||
CHECK_THROWS_AS(json::parse("\"\\9\""), std::invalid_argument);
|
||||
|
||||
// quotes must be closed
|
||||
CHECK_THROWS_AS(json::parse("\""), std::invalid_argument);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user