Skip to content

Commit

Permalink
Non-fatal erros do not stop ASTJSON test execution
Browse files Browse the repository at this point in the history
  • Loading branch information
wechman committed Feb 21, 2022
1 parent c44fd13 commit ff44c8a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/libsolidity/ASTJSONTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ TestCase::TestResult ASTJSONTest::run(ostream& _stream, string const& _linePrefi

if (!c.parseAndAnalyze(variant.stopAfter))
{
// Ignore non-fatal analysis errors, we only want to export.
if (c.state() > CompilerStack::State::Parsed)
continue;

SourceReferenceFormatter formatter(_stream, c, _formatted, false);
formatter.printErrorInformation(c.errors());
return TestResult::FatalError;
// We just want to export so raise fatal analysis errors only
if (c.state() < CompilerStack::State::ParsedAndImported)
{
SourceReferenceFormatter formatter(_stream, c, _formatted, false);
formatter.printErrorInformation(c.errors());
return TestResult::FatalError;
}
}

resultsMatch = resultsMatch && runTest(
Expand Down

0 comments on commit ff44c8a

Please sign in to comment.