mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Run metadata and gas meter tests when optimiser is on too
This commit is contained in:
parent
01fbc63623
commit
13edf1062f
@ -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();
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user