Skip to content

Commit

Permalink
More tests to get line coverage backt o 100%
Browse files Browse the repository at this point in the history
  • Loading branch information
Teemperor committed Jan 9, 2015
1 parent 7f4fcc5 commit 13efc7a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/json_unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 13efc7a

Please sign in to comment.