test: check the error texts

by changing parseAnalyseAndReturnError to return the whole Error, not just the type
This commit is contained in:
Yoichi Hirai 2016-11-15 19:07:33 +01:00
parent a7c2509adf
commit ab3db782ae
No known key found for this signature in database
GPG Key ID: E7B75D080FCF7992
2 changed files with 197 additions and 188 deletions

View File

@ -23,6 +23,7 @@
#pragma once
#include <string>
#include <regex>
#include <utility>
#include <libdevcore/Exceptions.h>
#include <libevmasm/SourceLocation.h>
@ -57,6 +58,14 @@ public:
Type type() const { return m_type; }
std::string const& typeName() const { return m_typeName; }
template <typename T>
bool regex_search(T&& _reg) const
{
if (std::string const* str = boost::get_error_info<errinfo_comment>(*this))
return std::regex_search(*str, std::regex(std::forward<T>(_reg)));
else
return false;
}
/// helper functions
static Error const* containsErrorOfType(ErrorList const& _list, Error::Type _type)

File diff suppressed because it is too large Load Diff