mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
test: add a failing test case about the gas cost of SUICIDE opcode
This commit is contained in:
parent
00b15d53b9
commit
259c551c61
@ -278,6 +278,19 @@ BOOST_AUTO_TEST_CASE(balance_gas)
|
|||||||
testRunTimeGas("f(uint256)", vector<bytes>{encodeArgs(2), encodeArgs(100)});
|
testRunTimeGas("f(uint256)", vector<bytes>{encodeArgs(2), encodeArgs(100)});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(selfdestruct_gas)
|
||||||
|
{
|
||||||
|
char const* sourceCode = R"(
|
||||||
|
contract A {
|
||||||
|
function f() {
|
||||||
|
selfdestruct(0x30);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)";
|
||||||
|
testCreationTimeGas(sourceCode);
|
||||||
|
testRunTimeGas("f()", vector<bytes>{encodeArgs()});
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_SUITE_END()
|
BOOST_AUTO_TEST_SUITE_END()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user