Add type checking test for address methods

This commit is contained in:
Alex Beregszaszi 2017-02-06 16:14:43 +00:00
parent 16e48219d3
commit ba437ef31a

View File

@ -5108,6 +5108,24 @@ BOOST_AUTO_TEST_CASE(early_exit_on_fatal_errors)
CHECK_ERROR(text, DeclarationError, "Identifier not found or not unique");
}
BOOST_AUTO_TEST_CASE(address_methods)
{
char const* text = R"(
contract C {
function f() {
address addr;
uint balance = addr.balance;
bool callRet = addr.call();
bool callcodeRet = addr.callcode();
bool delegatecallRet = addr.delegatecall();
bool sendRet = addr.send(1);
addr.transfer(1);
}
}
)";
CHECK_SUCCESS(text);
}
BOOST_AUTO_TEST_SUITE_END()
}