diff options
author | LianaHus <liana@ethdev.com> | 2015-10-02 20:41:40 +0800 |
---|---|---|
committer | LianaHus <liana@ethdev.com> | 2015-10-15 02:27:41 +0800 |
commit | 742e5b259a8c88e69f09ede7312673157cd77a1f (patch) | |
tree | 7d1d44995676d828e216078be7803e80cfaf7d0d /test/libsolidity | |
parent | 95ad87267878a168dba98d5eb16e27dc9632465d (diff) | |
download | dexon-solidity-742e5b259a8c88e69f09ede7312673157cd77a1f.tar.gz dexon-solidity-742e5b259a8c88e69f09ede7312673157cd77a1f.tar.zst dexon-solidity-742e5b259a8c88e69f09ede7312673157cd77a1f.zip |
added Error class for all kind of errors
Conflicts:
libsolidity/Exceptions.h
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityExpressionCompiler.cpp | 13 | ||||
-rw-r--r-- | test/libsolidity/SolidityParser.cpp | 2 |
2 files changed, 10 insertions, 5 deletions
diff --git a/test/libsolidity/SolidityExpressionCompiler.cpp b/test/libsolidity/SolidityExpressionCompiler.cpp index 545775ee..8134080e 100644 --- a/test/libsolidity/SolidityExpressionCompiler.cpp +++ b/test/libsolidity/SolidityExpressionCompiler.cpp @@ -85,9 +85,12 @@ Declaration const& resolveDeclaration( return *declaration; } -bytes compileFirstExpression(const string& _sourceCode, vector<vector<string>> _functions = {}, - vector<vector<string>> _localVariables = {}, - vector<shared_ptr<MagicVariableDeclaration const>> _globalDeclarations = {}) +bytes compileFirstExpression( + const string& _sourceCode, + vector<vector<string>> _functions = {}, + vector<vector<string>> _localVariables = {}, + vector<shared_ptr<MagicVariableDeclaration const>> _globalDeclarations = {} +) { Parser parser; ASTPointer<SourceUnit> sourceUnit; @@ -105,7 +108,9 @@ bytes compileFirstExpression(const string& _sourceCode, vector<vector<string>> _ declarations.reserve(_globalDeclarations.size() + 1); for (ASTPointer<Declaration const> const& variable: _globalDeclarations) declarations.push_back(variable.get()); - NameAndTypeResolver resolver(declarations); + /// TODO: + ErrorList errorList; + NameAndTypeResolver resolver(declarations, errorList); resolver.registerDeclarations(*sourceUnit); vector<ContractDefinition const*> inheritanceHierarchy; diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp index 03930479..a90399fc 100644 --- a/test/libsolidity/SolidityParser.cpp +++ b/test/libsolidity/SolidityParser.cpp @@ -76,7 +76,7 @@ BOOST_AUTO_TEST_CASE(missing_variable_name_in_declaration) char const* text = "contract test {\n" " uint256 ;\n" "}\n"; - BOOST_CHECK_THROW(parseText(text), ParserError); + BOOST_CHECK_THROW(parseText(text), Error); } BOOST_AUTO_TEST_CASE(empty_function) |