mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add a failing test about the gas cost of BALANCE
This commit is contained in:
parent
8387d0df83
commit
00b15d53b9
@ -265,6 +265,19 @@ BOOST_AUTO_TEST_CASE(exponent_size)
|
||||
testRunTimeGas("g(uint256)", vector<bytes>{encodeArgs(2)});
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(balance_gas)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract A {
|
||||
function lookup_balance(address a) returns (uint) {
|
||||
return a.balance;
|
||||
}
|
||||
}
|
||||
)";
|
||||
testCreationTimeGas(sourceCode);
|
||||
testRunTimeGas("f(uint256)", vector<bytes>{encodeArgs(2), encodeArgs(100)});
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user