Restrict the state when settings can be altered in CompilerStack

This commit is contained in:
Alex Beregszaszi
2019-02-28 12:55:36 +00:00
parent e9543d83c7
commit b04b86a938
3 changed files with 45 additions and 17 deletions
+1 -1
View File
@@ -42,8 +42,8 @@ BOOST_AUTO_TEST_CASE(does_not_include_creation_time_only_internal_functions)
function f() internal { for (uint i = 0; i < 10; ++i) x += 3 + i; }
}
)";
BOOST_REQUIRE(success(sourceCode));
m_compiler.setOptimiserSettings(dev::test::Options::get().optimize);
BOOST_REQUIRE(success(sourceCode));
BOOST_REQUIRE_MESSAGE(m_compiler.compile(), "Compiling contract failed");
bytes const& creationBytecode = m_compiler.object("C").bytecode;
bytes const& runtimeBytecode = m_compiler.runtimeObject("C").bytecode;