🔨 improved code coverage

This commit is contained in:
Niels Lohmann 2017-04-01 08:34:58 +02:00
parent c32d2e5b3c
commit 3a5cf9bd0a
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
2 changed files with 13 additions and 6 deletions

View file

@ -158,6 +158,15 @@ TEST_CASE("lexer class")
}
}
SECTION("very large string")
{
// strings larger than 1024 bytes yield a resize of the lexer's yytext buffer
std::string s("\"");
s += std::string(2048, 'x');
s += "\"";
CHECK((json::lexer(s.c_str(), 2050).scan() == json::lexer::token_type::value_string));
}
/* NOTE: to_unicode function has been removed
SECTION("to_unicode")
{