mirror of
https://github.com/nlohmann/json
synced 2025-01-05 23:21:06 +00:00
more coverage
This commit is contained in:
parent
2dd94dd943
commit
6ddb115072
@ -7344,6 +7344,13 @@ TEST_CASE("parser class")
|
||||
// horizontal tab
|
||||
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("\"\\u000a\"").parse().get<json::string_t>() == "\n");
|
||||
CHECK(json::parser("\"\\u00b0\"").parse().get<json::string_t>() == "°");
|
||||
|
Loading…
Reference in New Issue
Block a user