mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #8979 from ethereum/doc-json
[Trival] Test: Output JSON AST as array when it involves multiple sources
This commit is contained in:
commit
3211e22045
@ -1,3 +1,4 @@
|
||||
[
|
||||
{
|
||||
"absolutePath": "a",
|
||||
"exportedSymbols":
|
||||
@ -218,3 +219,4 @@
|
||||
],
|
||||
"src": "0:160:3"
|
||||
}
|
||||
]
|
||||
|
@ -140,6 +140,9 @@ TestCase::TestResult ASTJSONTest::run(ostream& _stream, string const& _linePrefi
|
||||
return TestResult::FatalError;
|
||||
}
|
||||
|
||||
if (m_sources.size() > 1)
|
||||
m_result += "[\n";
|
||||
|
||||
for (size_t i = 0; i < m_sources.size(); i++)
|
||||
{
|
||||
ostringstream result;
|
||||
@ -150,6 +153,9 @@ TestCase::TestResult ASTJSONTest::run(ostream& _stream, string const& _linePrefi
|
||||
m_result += "\n";
|
||||
}
|
||||
|
||||
if (m_sources.size() > 1)
|
||||
m_result += "]\n";
|
||||
|
||||
bool resultsMatch = true;
|
||||
|
||||
replaceTagWithVersion(m_expectation);
|
||||
|
Loading…
Reference in New Issue
Block a user