aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-07-19 02:31:23 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-07-19 03:22:00 +0800
commit13edf1062fac379fd4e91747a346385c5cfab683 (patch)
tree57b105c1ef27a5d87713c9d672c9ad8e78c69faf
parent01fbc636239f78134b37f9dedeacf40455ee2e0c (diff)
downloaddexon-solidity-13edf1062fac379fd4e91747a346385c5cfab683.tar
dexon-solidity-13edf1062fac379fd4e91747a346385c5cfab683.tar.gz
dexon-solidity-13edf1062fac379fd4e91747a346385c5cfab683.tar.bz2
dexon-solidity-13edf1062fac379fd4e91747a346385c5cfab683.tar.lz
dexon-solidity-13edf1062fac379fd4e91747a346385c5cfab683.tar.xz
dexon-solidity-13edf1062fac379fd4e91747a346385c5cfab683.tar.zst
dexon-solidity-13edf1062fac379fd4e91747a346385c5cfab683.zip
Run metadata and gas meter tests when optimiser is on too
-rw-r--r--test/libsolidity/GasMeter.cpp3
-rw-r--r--test/libsolidity/Metadata.cpp3
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));