Skip to content

Commit

Permalink
another test case
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Apr 12, 2015
1 parent 6ddb115 commit 4c55ada
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test/unit.cpp
Expand Up @@ -7346,9 +7346,16 @@ TEST_CASE("parser class")

// exotic test cases for full coverage
{
std::stringstream ss;
ss << "\"\\u000\n1\"";
CHECK(json::parser(ss).parse().get<json::string_t>() == "\x01");
{
std::stringstream ss;
ss << "\"\\u000\n1\"";
CHECK(json::parser(ss).parse().get<json::string_t>() == "\x01");
}
{
std::stringstream ss;
ss << "\"\\u00\n01\"";
CHECK(json::parser(ss).parse().get<json::string_t>() == "\x01");
}
}

CHECK(json::parser("\"\\u0001\"").parse().get<json::string_t>() == "\x01");
Expand Down

0 comments on commit 4c55ada

Please sign in to comment.