[isoltest] Error out in case of different result when enforcing via yul.

Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
This commit is contained in:
Djordje Mijovic 2020-12-08 11:40:16 +01:00 committed by Alex Beregszaszi
parent ece2fdd8c6
commit b92d024898

View File

@ -226,12 +226,15 @@ TestCase::TestResult SemanticTest::runTest(ostream& _stream, string const& _line
} }
} }
if (success && !m_runWithYul && _compileViaYul) if (!m_runWithYul && _compileViaYul)
{ {
m_compileViaYulCanBeSet = true; m_compileViaYulCanBeSet = success;
AnsiColorized(_stream, _formatted, {BOLD, YELLOW}) << string message = success ?
"Test can pass via Yul, but marked with \"compileViaYul: false.\"" :
"Test compiles via Yul, but it gives different test results.";
AnsiColorized(_stream, _formatted, {BOLD, success ? YELLOW : MAGENTA}) <<
_linePrefix << endl << _linePrefix << endl <<
_linePrefix << "Test can pass via Yul and marked with compileViaYul: false." << endl; _linePrefix << message << endl;
return TestResult::Failure; return TestResult::Failure;
} }