aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/GasMeter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/GasMeter.cpp')
-rw-r--r--test/libsolidity/GasMeter.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/libsolidity/GasMeter.cpp b/test/libsolidity/GasMeter.cpp
index bc4c25bd..220d27cf 100644
--- a/test/libsolidity/GasMeter.cpp
+++ b/test/libsolidity/GasMeter.cpp
@@ -291,6 +291,21 @@ BOOST_AUTO_TEST_CASE(selfdestruct_gas)
testRunTimeGas("f()", vector<bytes>{encodeArgs()});
}
+BOOST_AUTO_TEST_CASE(extcodesize_gas)
+{
+ char const* sourceCode = R"(
+ contract A {
+ function f() returns (uint _s) {
+ assembly {
+ _s := extcodesize(0x30)
+ }
+ }
+ }
+ )";
+ testCreationTimeGas(sourceCode);
+ testRunTimeGas("f()", vector<bytes>{encodeArgs()});
+}
+
BOOST_AUTO_TEST_SUITE_END()
}