Update parser tests

This commit is contained in:
Alex Beregszaszi 2017-08-09 20:58:57 +01:00
parent 2a9ba937ba
commit 1c1388f241

View File

@ -906,22 +906,23 @@ BOOST_AUTO_TEST_CASE(multiple_visibility_specifiers)
CHECK_PARSE_ERROR(text, "Visibility already specified as \"private\"."); CHECK_PARSE_ERROR(text, "Visibility already specified as \"private\".");
} }
BOOST_AUTO_TEST_CASE(multiple_payable_specifiers) BOOST_AUTO_TEST_CASE(multiple_statemutability_specifiers)
{ {
char const* text = R"( char const* text = R"(
contract c { contract c {
function f() payable payable {} function f() payable payable {}
})"; })";
CHECK_PARSE_ERROR(text, "Multiple \"payable\" specifiers."); CHECK_PARSE_ERROR(text, "State mutability already specified as \"payable\".");
} text = R"(
BOOST_AUTO_TEST_CASE(multiple_constant_specifiers)
{
char const* text = R"(
contract c { contract c {
function f() constant constant {} function f() constant constant {}
})"; })";
CHECK_PARSE_ERROR(text, "Multiple \"constant\" specifiers."); CHECK_PARSE_ERROR(text, "State mutability already specified as \"view\".");
text = R"(
contract c {
function f() payable constant {}
})";
CHECK_PARSE_ERROR(text, "State mutability already specified as \"payable\".");
} }
BOOST_AUTO_TEST_CASE(literal_constants_with_ether_subdenominations) BOOST_AUTO_TEST_CASE(literal_constants_with_ether_subdenominations)