1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-29 23:01:16 +03:00

overworked coverage

This commit is contained in:
Niels
2015-05-09 14:54:33 +02:00
parent bb142d6cae
commit 1f381d496d
3 changed files with 23 additions and 38 deletions

View File

@ -7405,21 +7405,6 @@ TEST_CASE("parser class")
// horizontal tab
CHECK(json::parser("\"\\t\"").parse() == json("\t"));
// exotic test cases for full coverage
{
// that one got illegal
//{
// 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");
CHECK(json::parser("\"\\u000a\"").parse().get<json::string_t>() == "\n");
CHECK(json::parser("\"\\u00b0\"").parse().get<json::string_t>() == "°");