[isoltest] Enforcing compileViaYul to be set if test can pass via yul

This commit is contained in:
Djordje Mijovic
2020-05-05 00:38:13 +02:00
committed by chriseth
parent cb32530b6b
commit 8b7f87eed5
127 changed files with 412 additions and 145 deletions
+5 -2
View File
@@ -40,13 +40,14 @@ class SemanticTest: public SolidityExecutionFramework, public EVMVersionRestrict
{
public:
static std::unique_ptr<TestCase> create(Config const& _options)
{ return std::make_unique<SemanticTest>(_options.filename, _options.evmVersion); }
{ return std::make_unique<SemanticTest>(_options.filename, _options.evmVersion, _options.enforceCompileViaYul); }
explicit SemanticTest(std::string const& _filename, langutil::EVMVersion _evmVersion);
explicit SemanticTest(std::string const& _filename, langutil::EVMVersion _evmVersion, bool _enforceViaYul = false);
TestResult run(std::ostream& _stream, std::string const& _linePrefix = "", bool _formatted = false) override;
void printSource(std::ostream &_stream, std::string const& _linePrefix = "", bool _formatted = false) const override;
void printUpdatedExpectations(std::ostream& _stream, std::string const& _linePrefix = "") const override;
void printUpdatedSettings(std::ostream& _stream, std::string const& _linePrefix = "") override;
/// Instantiates a test file parser that parses the additional comment section at the end of
/// the input stream \param _stream. Each function call is represented using a `FunctionCallTest`
@@ -64,8 +65,10 @@ private:
std::vector<TestFunctionCall> m_tests;
bool m_runWithYul = false;
bool m_runWithoutYul = true;
bool m_enforceViaYul = false;
bool m_runWithABIEncoderV1Only = false;
bool m_allowNonExistingFunctions = false;
bool m_compileViaYulCanBeSet = false;
};
}