From 259c551c617695928d721ebcfcd132902ff34d3f Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Thu, 5 Jan 2017 14:16:57 +0100 Subject: test: add a failing test case about the gas cost of SUICIDE opcode --- test/libsolidity/GasMeter.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test') 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{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{encodeArgs()}); +} + BOOST_AUTO_TEST_SUITE_END() } -- cgit