aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/GasMeter.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-07-18 21:34:22 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-07-18 23:14:25 +0800
commit075715cf151669058251c78b47c0b94fc913e74a (patch)
tree33b58cb3ceffed2c2893be6778f005bf763d9e5d /test/libsolidity/GasMeter.cpp
parent0eab808ececc9d7b835a5c174731c9eded04bf43 (diff)
downloaddexon-solidity-075715cf151669058251c78b47c0b94fc913e74a.tar.gz
dexon-solidity-075715cf151669058251c78b47c0b94fc913e74a.tar.zst
dexon-solidity-075715cf151669058251c78b47c0b94fc913e74a.zip
Do not use obscure CompilerStack methods in tests
Diffstat (limited to 'test/libsolidity/GasMeter.cpp')
-rw-r--r--test/libsolidity/GasMeter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/libsolidity/GasMeter.cpp b/test/libsolidity/GasMeter.cpp
index ef560b12..704ae855 100644
--- a/test/libsolidity/GasMeter.cpp
+++ b/test/libsolidity/GasMeter.cpp
@@ -47,7 +47,9 @@ public:
GasMeterTestFramework() { }
void compile(string const& _sourceCode)
{
- m_compiler.setSource("pragma solidity >= 0.0;" + _sourceCode);
+ m_compiler.reset(false);
+ m_compiler.addSource("", "pragma solidity >=0.0;\n" + _sourceCode);
+ /// NOTE: compiles without optimisations
ETH_TEST_REQUIRE_NO_THROW(m_compiler.compile(), "Compiling contract failed");
AssemblyItems const* items = m_compiler.runtimeAssemblyItems("");