aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2017-01-05 21:16:57 +0800
committerchriseth <chris@ethereum.org>2017-04-25 22:14:58 +0800
commit259c551c617695928d721ebcfcd132902ff34d3f (patch)
treea6ba084794314879b7aa4e995bffe68a15bca7bf
parent00b15d53b945494723df667fc37b32db9ae52673 (diff)
downloaddexon-solidity-259c551c617695928d721ebcfcd132902ff34d3f.tar.gz
dexon-solidity-259c551c617695928d721ebcfcd132902ff34d3f.tar.zst
dexon-solidity-259c551c617695928d721ebcfcd132902ff34d3f.zip
test: add a failing test case about the gas cost of SUICIDE opcode
-rw-r--r--test/libsolidity/GasMeter.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/libsolidity/GasMeter.cpp b/test/libsolidity/GasMeter.cpp
index aa36e891..bc4c25bd 100644
--- a/test/libsolidity/GasMeter.cpp
+++ b/test/libsolidity/GasMeter.cpp
@@ -278,6 +278,19 @@ BOOST_AUTO_TEST_CASE(balance_gas)
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()
}