more coverage

This commit is contained in:
Niels 2015-04-12 18:12:29 +02:00
parent 2dd94dd943
commit 6ddb115072

View file

@ -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>() == "°");