diff options
author | chriseth <chris@ethereum.org> | 2018-02-10 06:54:05 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-02-12 23:41:31 +0800 |
commit | 676cf52264a5522ebdf77d096a15384336ea0566 (patch) | |
tree | 4d705e3e3519304519739ac4c134cb2d46699714 /test/libsolidity/ErrorCheck.h | |
parent | 2095e7a32dce04f6142074bf96f14b6c7046137a (diff) | |
download | dexon-solidity-676cf52264a5522ebdf77d096a15384336ea0566.tar.gz dexon-solidity-676cf52264a5522ebdf77d096a15384336ea0566.tar.zst dexon-solidity-676cf52264a5522ebdf77d096a15384336ea0566.zip |
Support searching inside multiple errors.
Diffstat (limited to 'test/libsolidity/ErrorCheck.h')
-rw-r--r-- | test/libsolidity/ErrorCheck.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/libsolidity/ErrorCheck.h b/test/libsolidity/ErrorCheck.h index a309a9d3..8ad81f85 100644 --- a/test/libsolidity/ErrorCheck.h +++ b/test/libsolidity/ErrorCheck.h @@ -23,10 +23,17 @@ #include <libsolidity/interface/Exceptions.h> +#include <vector> +#include <tuple> + namespace dev { namespace solidity { bool searchErrorMessage(Error const& _err, std::string const& _substr); +/// Checks that all provided errors are of the given type and have a given substring in their +/// description. +/// If the expectations are not met, returns a nonempty description, otherwise an empty string. +std::string searchErrors(ErrorList const& _errors, std::vector<std::pair<Error::Type, std::string>> const& _expectations); } } |