diff options
author | chriseth <chris@ethereum.org> | 2018-04-17 05:03:49 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-17 05:03:49 +0800 |
commit | 4cb486ee993cadde5564fb6c611d2bcf4fc44414 (patch) | |
tree | 6b971913021037cf28141c38af97c7ecda77719f /test/libsolidity/GasMeter.cpp | |
parent | dfe3193c7382c80f1814247a162663a97c3f5e67 (diff) | |
parent | b8431c5c4a6795db8c42a1a3389047658bb87301 (diff) | |
download | dexon-solidity-4cb486ee993cadde5564fb6c611d2bcf4fc44414.tar dexon-solidity-4cb486ee993cadde5564fb6c611d2bcf4fc44414.tar.gz dexon-solidity-4cb486ee993cadde5564fb6c611d2bcf4fc44414.tar.bz2 dexon-solidity-4cb486ee993cadde5564fb6c611d2bcf4fc44414.tar.lz dexon-solidity-4cb486ee993cadde5564fb6c611d2bcf4fc44414.tar.xz dexon-solidity-4cb486ee993cadde5564fb6c611d2bcf4fc44414.tar.zst dexon-solidity-4cb486ee993cadde5564fb6c611d2bcf4fc44414.zip |
Merge pull request #3892 from ethereum/develop
Merge develop into release for 0.4.22
Diffstat (limited to 'test/libsolidity/GasMeter.cpp')
-rw-r--r-- | test/libsolidity/GasMeter.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/libsolidity/GasMeter.cpp b/test/libsolidity/GasMeter.cpp index fd2017f9..0d66456c 100644 --- a/test/libsolidity/GasMeter.cpp +++ b/test/libsolidity/GasMeter.cpp @@ -294,6 +294,19 @@ BOOST_AUTO_TEST_CASE(extcodesize_gas) testRunTimeGas("f()", vector<bytes>{encodeArgs()}); } +BOOST_AUTO_TEST_CASE(regular_functions_exclude_fallback) +{ + // A bug in the estimator caused the costs for a specific function + // to always include the costs for the fallback. + char const* sourceCode = R"( + contract A { + uint public x; + function() { x = 2; } + } + )"; + testCreationTimeGas(sourceCode); + testRunTimeGas("x()", vector<bytes>{encodeArgs()}); +} BOOST_AUTO_TEST_SUITE_END() } |