Use setSource in tests

This commit is contained in:
Alex Beregszaszi
2019-03-25 15:11:08 +00:00
parent 0d6d0f476c
commit 3ee8bb6814
9 changed files with 174 additions and 122 deletions
+2 -2
View File
@@ -40,8 +40,8 @@ class JSONInterfaceChecker
public:
void checkInterface(std::string const& _code, std::string const& _contractName, std::string const& _expectedInterfaceString)
{
m_compilerStack.reset(false);
m_compilerStack.addSource("", "pragma solidity >=0.0;\n" + _code);
m_compilerStack.reset();
m_compilerStack.setSources({{"", "pragma solidity >=0.0;\n" + _code}});
m_compilerStack.setEVMVersion(dev::test::Options::get().evmVersion());
m_compilerStack.setOptimiserSettings(dev::test::Options::get().optimize);
BOOST_REQUIRE_MESSAGE(m_compilerStack.parseAndAnalyze(), "Parsing contract failed");