Skip to content

Commit ea0a8c1

Browse files
tavian-devclonker
authored andcommitted
Preserve failAfter directive in isoltest ASTJSON reformatting
When isoltest updates test expectations for ASTJSON tests, it calls printSource() to rewrite the .sol input file. The function was not outputting the failAfter directive that was parsed and stored in m_expectedFailAfter, causing the directive to be silently dropped. Fixes #14093
1 parent eccdf47 commit ea0a8c1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

test/libsolidity/ASTJSONTest.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,9 @@ void ASTJSONTest::printSource(std::ostream& _stream, std::string const& _linePre
295295
printPrefixed(_stream, source.second, _linePrefix);
296296
_stream << std::endl;
297297
}
298+
299+
if (m_expectedFailAfter.has_value())
300+
printPrefixed(_stream, "// failAfter: " + compilerStateToString(m_expectedFailAfter.value()) + "\n", _linePrefix);
298301
}
299302

300303
void ASTJSONTest::printUpdatedExpectations(std::ostream&, std::string const&) const

0 commit comments

Comments
 (0)