test: add a test case about the gas cost of EXTCODESIZE

This commit is contained in:
Yoichi Hirai
2017-04-25 16:14:58 +02:00
committed by chriseth
parent 259c551c61
commit 7da9ba68e9
+15
View File
@@ -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()
}