test: allow multiple errors in modifier-function overriding

This commit is contained in:
Yoichi Hirai 2016-12-14 14:18:11 +01:00
parent 0216f34010
commit 9602318eab
No known key found for this signature in database
GPG Key ID: E7B75D080FCF7992

View File

@ -1056,7 +1056,9 @@ BOOST_AUTO_TEST_CASE(modifier_overrides_function)
contract A { modifier mod(uint a) { _; } }
contract B is A { function mod(uint a) { } }
)";
CHECK_ERROR(text, DeclarationError, "");
// Error: Identifier already declared.
// Error: Override changes modifier to function.
CHECK_ERROR_ALLOW_MULTI(text, DeclarationError, "");
}
BOOST_AUTO_TEST_CASE(function_overrides_modifier)
@ -1065,7 +1067,9 @@ BOOST_AUTO_TEST_CASE(function_overrides_modifier)
contract A { function mod(uint a) { } }
contract B is A { modifier mod(uint a) { _; } }
)";
CHECK_ERROR(text, DeclarationError, "");
// Error: Identifier already declared.
// Error: Override changes function to modifier.
CHECK_ERROR_ALLOW_MULTI(text, DeclarationError, "");
}
BOOST_AUTO_TEST_CASE(modifier_returns_value)