solidity/test/libsolidity/semanticTests/extracted/gasleft_decrease.sol
2020-03-18 11:56:43 -05:00

21 lines
372 B
Solidity

contract C {
uint256 v;
function f() public returns (bool) {
uint256 startGas = gasleft();
v++;
assert(startGas > gasleft());
return true;
}
function g() public returns (bool) {
uint256 startGas = gasleft();
assert(startGas > gasleft());
return true;
}
}
// ----
// f() -> true
// g() -> true