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
+3 -2
View File
@@ -92,13 +92,14 @@ bool ASTJSONTest::run(ostream& _stream, string const& _linePrefix, bool const _f
{
CompilerStack c;
StringMap sources;
map<string, unsigned> sourceIndices;
for (size_t i = 0; i < m_sources.size(); i++)
{
c.addSource(m_sources[i].first, m_sources[i].second);
sources[m_sources[i].first] = m_sources[i].second;
sourceIndices[m_sources[i].first] = i + 1;
}
c.setSources(sources);
c.setEVMVersion(dev::test::Options::get().evmVersion());
c.parseAndAnalyze();