Fix UTF-8 validation for high codepoints (>10000)

This commit is contained in:
Alex Beregszaszi
2017-06-16 16:41:29 +02:00
committed by chriseth
parent 17de4a0756
commit d7e63f23de
2 changed files with 11 additions and 1 deletions
@@ -2422,6 +2422,16 @@ BOOST_AUTO_TEST_CASE(invalid_utf8_explicit)
CHECK_ERROR(sourceCode, TypeError, "Explicit type conversion not allowed");
}
BOOST_AUTO_TEST_CASE(large_utf8_codepoint)
{
char const* sourceCode = R"(
contract C {
string s = "\xf0\x9f\xa6\x84";
}
)";
CHECK_SUCCESS(sourceCode);
}
BOOST_AUTO_TEST_CASE(string_index)
{
char const* sourceCode = R"(