more coverage
This commit is contained in:
parent
2dd94dd943
commit
6ddb115072
1 changed files with 7 additions and 0 deletions
|
@ -7344,6 +7344,13 @@ TEST_CASE("parser class")
|
||||||
// horizontal tab
|
// horizontal tab
|
||||||
CHECK(json::parser("\"\\t\"").parse() == json("\t"));
|
CHECK(json::parser("\"\\t\"").parse() == json("\t"));
|
||||||
|
|
||||||
|
// exotic test cases for full coverage
|
||||||
|
{
|
||||||
|
std::stringstream ss;
|
||||||
|
ss << "\"\\u000\n1\"";
|
||||||
|
CHECK(json::parser(ss).parse().get<json::string_t>() == "\x01");
|
||||||
|
}
|
||||||
|
|
||||||
CHECK(json::parser("\"\\u0001\"").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("\"\\u000a\"").parse().get<json::string_t>() == "\n");
|
||||||
CHECK(json::parser("\"\\u00b0\"").parse().get<json::string_t>() == "°");
|
CHECK(json::parser("\"\\u00b0\"").parse().get<json::string_t>() == "°");
|
||||||
|
|
Loading…
Reference in a new issue