Merge pull request #10546 from ethereum/isoltestHardError

[isoltest] Error out in case of different result when enforcing via yul.
This commit is contained in:
Alex Beregszaszi 2021-01-14 22:53:36 +00:00 committed by GitHub
commit eaf7d7daa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;
AnsiColorized(_stream, _formatted, {BOLD, YELLOW}) <<
m_compileViaYulCanBeSet = success;
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 << "Test can pass via Yul and marked with compileViaYul: false." << endl;
_linePrefix << message << endl;
return TestResult::Failure;
}