mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
test: add a test case about the gas cost of EXTCODESIZE
This commit is contained in:
parent
259c551c61
commit
7da9ba68e9
@ -291,6 +291,21 @@ BOOST_AUTO_TEST_CASE(selfdestruct_gas)
|
||||
testRunTimeGas("f()", vector<bytes>{encodeArgs()});
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(extcodesize_gas)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract A {
|
||||
function f() returns (uint _s) {
|
||||
assembly {
|
||||
_s := extcodesize(0x30)
|
||||
}
|
||||
}
|
||||
}
|
||||
)";
|
||||
testCreationTimeGas(sourceCode);
|
||||
testRunTimeGas("f()", vector<bytes>{encodeArgs()});
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user