Improve error coverage of parser

This commit is contained in:
a3d4 2020-08-19 01:15:08 +02:00
parent 660ef792ab
commit 0f5d0b6455
4 changed files with 14 additions and 18 deletions

View File

@ -220,12 +220,12 @@ def examine_id_coverage(top_dir, source_id_to_file_names, new_ids_only=False):
"1054", "1123", "1133", "1220", "1584", "1823", "1950", "1957",
"1988", "2418", "2461", "2512", "2592", "2657", "2800", "2842", "2856",
"3263", "3299", "3356", "3441", "3682", "3876",
"3893", "3997", "4010", "4110", "4802", "4805", "4828",
"3893", "3997", "4010", "4802", "4805", "4828",
"4904", "4990", "5052", "5073", "5170", "5188", "5272", "5333", "5347", "5473",
"5622", "6041", "6052", "6272", "6708", "6792", "6931", "7110", "7128", "7186",
"7319", "7589", "7593", "7653", "7812", "7885", "8065", "8084", "8140",
"8261", "8312", "8452", "8592", "8758", "9011",
"9085", "9102", "9390", "9439", "9440", "9547", "9551", "9615", "9980"
"9085", "9390", "9440", "9547", "9551", "9615", "9980"
}
new_source_only_ids = source_only_ids - old_source_only_ids
if len(new_source_only_ids) != 0:

View File

@ -511,22 +511,6 @@ BOOST_AUTO_TEST_CASE(contract_multiple_inheritance_with_arguments)
BOOST_CHECK(successParse(text));
}
BOOST_AUTO_TEST_CASE(multiple_visibility_specifiers)
{
char const* text = R"(
contract c {
uint private internal a;
}
)";
CHECK_PARSE_ERROR(text, "Visibility already specified as \"private\".");
text = R"(
contract c {
function f() private external {}
}
)";
CHECK_PARSE_ERROR(text, "Visibility already specified as \"private\".");
}
BOOST_AUTO_TEST_CASE(keyword_is_reserved)
{
auto keywords = {

View File

@ -0,0 +1,5 @@
contract C {
modifier f() override override {}
}
// ----
// ParserError 9102: (39-47): Override already specified.

View File

@ -0,0 +1,7 @@
contract C {
uint private internal a;
function f() private external {}
}
// ----
// ParserError 4110: (30-38): Visibility already specified as "private".
// ParserError 9439: (67-75): Visibility already specified as "private".