Require modifiers to contain "_".

This commit is contained in:
chriseth
2016-08-16 14:52:47 +02:00
parent e3e4d84f33
commit 6df6728165
3 changed files with 39 additions and 1 deletions
@@ -3823,6 +3823,16 @@ BOOST_AUTO_TEST_CASE(unused_return_value_delegatecall)
BOOST_CHECK(expectError(text, true) == Error::Type::Warning);
}
BOOST_AUTO_TEST_CASE(modifier_without_underscore)
{
char const* text = R"(
contract test {
modifier m() {}
}
)";
BOOST_CHECK(expectError(text, true) == Error::Type::SyntaxError);
}
BOOST_AUTO_TEST_SUITE_END()
}