diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-07-19 02:31:23 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-07-19 03:22:00 +0800 |
commit | 13edf1062fac379fd4e91747a346385c5cfab683 (patch) | |
tree | 57b105c1ef27a5d87713c9d672c9ad8e78c69faf /test/libsolidity | |
parent | 01fbc636239f78134b37f9dedeacf40455ee2e0c (diff) | |
download | dexon-solidity-13edf1062fac379fd4e91747a346385c5cfab683.tar.gz dexon-solidity-13edf1062fac379fd4e91747a346385c5cfab683.tar.zst dexon-solidity-13edf1062fac379fd4e91747a346385c5cfab683.zip |
Run metadata and gas meter tests when optimiser is on too
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/GasMeter.cpp | 3 | ||||
-rw-r--r-- | test/libsolidity/Metadata.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/test/libsolidity/GasMeter.cpp b/test/libsolidity/GasMeter.cpp index 704ae855..8b41e1db 100644 --- a/test/libsolidity/GasMeter.cpp +++ b/test/libsolidity/GasMeter.cpp @@ -49,8 +49,7 @@ public: { 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"); + ETH_TEST_REQUIRE_NO_THROW(m_compiler.compile(dev::test::Options::get().optimize), "Compiling contract failed"); AssemblyItems const* items = m_compiler.runtimeAssemblyItems(""); ASTNode const& sourceUnit = m_compiler.ast(); diff --git a/test/libsolidity/Metadata.cpp b/test/libsolidity/Metadata.cpp index 32cf910b..08dd4bb4 100644 --- a/test/libsolidity/Metadata.cpp +++ b/test/libsolidity/Metadata.cpp @@ -44,8 +44,7 @@ BOOST_AUTO_TEST_CASE(metadata_stamp) )"; CompilerStack compilerStack; compilerStack.addSource("", std::string(sourceCode)); - /// NOTE: compiles without optimisations - ETH_TEST_REQUIRE_NO_THROW(compilerStack.compile(), "Compiling contract failed"); + ETH_TEST_REQUIRE_NO_THROW(compilerStack.compile(dev::test::Options::get().optimize), "Compiling contract failed"); bytes const& bytecode = compilerStack.runtimeObject("test").bytecode; std::string const& metadata = compilerStack.onChainMetadata("test"); BOOST_CHECK(dev::test::isValidMetadata(metadata)); |