mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add type checking test for address methods
This commit is contained in:
parent
16e48219d3
commit
ba437ef31a
@ -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()
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user