diff options
author | Yoichi Hirai <i@yoichihirai.com> | 2017-07-19 17:35:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-19 17:35:26 +0800 |
commit | 1a7b61ad05f77bcfaf8cdd16f648e429ab63e279 (patch) | |
tree | 57b105c1ef27a5d87713c9d672c9ad8e78c69faf | |
parent | 01fbc636239f78134b37f9dedeacf40455ee2e0c (diff) | |
parent | 13edf1062fac379fd4e91747a346385c5cfab683 (diff) | |
download | dexon-solidity-1a7b61ad05f77bcfaf8cdd16f648e429ab63e279.tar dexon-solidity-1a7b61ad05f77bcfaf8cdd16f648e429ab63e279.tar.gz dexon-solidity-1a7b61ad05f77bcfaf8cdd16f648e429ab63e279.tar.bz2 dexon-solidity-1a7b61ad05f77bcfaf8cdd16f648e429ab63e279.tar.lz dexon-solidity-1a7b61ad05f77bcfaf8cdd16f648e429ab63e279.tar.xz dexon-solidity-1a7b61ad05f77bcfaf8cdd16f648e429ab63e279.tar.zst dexon-solidity-1a7b61ad05f77bcfaf8cdd16f648e429ab63e279.zip |
Merge pull request #2588 from ethereum/test-optimiser
Run metadata and gas meter tests when optimiser is on too
-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)); |