Non-fatal erros do not stop ASTJSON test execution

This commit is contained in:
wechman
2022-03-14 14:21:06 +01:00
committed by wechman
parent 5f7ff667b9
commit 38639417e1
+7 -7
View File
@@ -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(