From 742e5b259a8c88e69f09ede7312673157cd77a1f Mon Sep 17 00:00:00 2001 From: LianaHus Date: Fri, 2 Oct 2015 14:41:40 +0200 Subject: added Error class for all kind of errors Conflicts: libsolidity/Exceptions.h --- test/libsolidity/SolidityExpressionCompiler.cpp | 13 +++++++++---- test/libsolidity/SolidityParser.cpp | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'test') 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> _functions = {}, - vector> _localVariables = {}, - vector> _globalDeclarations = {}) +bytes compileFirstExpression( + const string& _sourceCode, + vector> _functions = {}, + vector> _localVariables = {}, + vector> _globalDeclarations = {} +) { Parser parser; ASTPointer sourceUnit; @@ -105,7 +108,9 @@ bytes compileFirstExpression(const string& _sourceCode, vector> _ declarations.reserve(_globalDeclarations.size() + 1); for (ASTPointer const& variable: _globalDeclarations) declarations.push_back(variable.get()); - NameAndTypeResolver resolver(declarations); + /// TODO: + ErrorList errorList; + NameAndTypeResolver resolver(declarations, errorList); resolver.registerDeclarations(*sourceUnit); vector 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) -- cgit v1.2.3