SyntaxTests: extend syntax tests and isoltest to support parser errors and compiler exceptions.

This commit is contained in:
Daniel Kirchner
2018-04-03 19:54:45 +02:00
parent 104a9736b3
commit 6f9644add1
5 changed files with 104 additions and 125 deletions
+5 -2
View File
@@ -57,8 +57,8 @@ protected:
bool success(std::string const& _source);
ErrorList expectError(std::string const& _source, bool _warning = false, bool _allowMultiple = false);
std::string formatErrors();
std::string formatError(Error const& _error);
std::string formatErrors() const;
std::string formatError(Error const& _error) const;
static ContractDefinition const* retrieveContractByName(SourceUnit const& _source, std::string const& _name);
static FunctionTypePointer retrieveFunctionBySignature(
@@ -66,6 +66,9 @@ protected:
std::string const& _signature
);
// filter out the warnings in m_warningsToFilter or all warnings if _includeWarnings is false
ErrorList filterErrors(ErrorList const& _errorList, bool _includeWarnings) const;
std::vector<std::string> m_warningsToFilter = {"This is a pre-release compiler version"};
dev::solidity::CompilerStack m_compiler;
};