mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Function modifier parsing.
This commit is contained in:
parent
99b31eab89
commit
dabf947679
@ -540,6 +540,33 @@ BOOST_AUTO_TEST_CASE(contract_multiple_inheritance_with_arguments)
|
||||
BOOST_CHECK_NO_THROW(parseText(text));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(placeholder_in_function_context)
|
||||
{
|
||||
char const* text = "contract c {\n"
|
||||
" function fun() returns (uint r) {\n"
|
||||
" var _ = 8;\n"
|
||||
" return _ + 1;"
|
||||
" }\n"
|
||||
"}\n";
|
||||
BOOST_CHECK_NO_THROW(parseText(text));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(modifier)
|
||||
{
|
||||
char const* text = "contract c {\n"
|
||||
" modifier mod { if (msg.sender == 0) _ }\n"
|
||||
"}\n";
|
||||
BOOST_CHECK_NO_THROW(parseText(text));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(modifier_arguments)
|
||||
{
|
||||
char const* text = "contract c {\n"
|
||||
" modifier mod(uint a) { if (msg.sender == a) _ }\n"
|
||||
"}\n";
|
||||
BOOST_CHECK_NO_THROW(parseText(text));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user