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.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/libsolidity/GasMeter.cpp b/test/libsolidity/GasMeter.cpp
index 3f06cb85..aa36e891 100644
--- a/test/libsolidity/GasMeter.cpp
+++ b/test/libsolidity/GasMeter.cpp
@@ -265,6 +265,19 @@ BOOST_AUTO_TEST_CASE(exponent_size)
testRunTimeGas("g(uint256)", vector<bytes>{encodeArgs(2)});
}
+BOOST_AUTO_TEST_CASE(balance_gas)
+{
+ char const* sourceCode = R"(
+ contract A {
+ function lookup_balance(address a) returns (uint) {
+ return a.balance;
+ }
+ }
+ )";
+ testCreationTimeGas(sourceCode);
+ testRunTimeGas("f(uint256)", vector<bytes>{encodeArgs(2), encodeArgs(100)});
+}
+
BOOST_AUTO_TEST_SUITE_END()
}