diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-07-31 18:15:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-31 18:15:45 +0800 |
commit | fe28814d836630bd66d615ef11f1620deaf3eade (patch) | |
tree | fafe5b1c7592f165ac058d5f2742265c58e274a4 /test/libsolidity/SolidityOptimizer.cpp | |
parent | 75c1a9bd10d8bc2217141fc5d965a1276b1570ae (diff) | |
parent | 7fa2d0c84ed3d0fc6462fdd8f94d9834c1031114 (diff) | |
download | dexon-solidity-fe28814d836630bd66d615ef11f1620deaf3eade.tar.gz dexon-solidity-fe28814d836630bd66d615ef11f1620deaf3eade.tar.zst dexon-solidity-fe28814d836630bd66d615ef11f1620deaf3eade.zip |
Merge pull request #4625 from ethereum/pragma-cleanup
Remove unnecessary or stray version pragmas
Diffstat (limited to 'test/libsolidity/SolidityOptimizer.cpp')
-rw-r--r-- | test/libsolidity/SolidityOptimizer.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/libsolidity/SolidityOptimizer.cpp b/test/libsolidity/SolidityOptimizer.cpp index 3e2dce26..119f80d1 100644 --- a/test/libsolidity/SolidityOptimizer.cpp +++ b/test/libsolidity/SolidityOptimizer.cpp @@ -74,9 +74,9 @@ public: unsigned const _optimizeRuns = 200 ) { - m_nonOptimizedBytecode = compileAndRunWithOptimizer(_sourceCode, _value, _contractName, false, _optimizeRuns); + m_nonOptimizedBytecode = compileAndRunWithOptimizer("pragma solidity >=0.0;\n" + _sourceCode, _value, _contractName, false, _optimizeRuns); m_nonOptimizedContract = m_contractAddress; - m_optimizedBytecode = compileAndRunWithOptimizer(_sourceCode, _value, _contractName, true, _optimizeRuns); + m_optimizedBytecode = compileAndRunWithOptimizer("pragma solidity >=0.0;\n" + _sourceCode, _value, _contractName, true, _optimizeRuns); size_t nonOptimizedSize = numInstructions(m_nonOptimizedBytecode); size_t optimizedSize = numInstructions(m_optimizedBytecode); BOOST_CHECK_MESSAGE( @@ -441,8 +441,6 @@ BOOST_AUTO_TEST_CASE(constant_optimization_early_exit) // This tests that the constant optimizer does not try to find the best representation // indefinitely but instead stops after some number of iterations. char const* sourceCode = R"( - pragma solidity ^0.4.0; - contract HexEncoding { function hexEncodeTest(address addr) public returns (bytes32 ret) { uint x = uint(addr) / 2**32; |