Various fixes pertaining to State Variable accessors

This commit is contained in:
Lefteris Karapetsas 2015-01-28 18:06:45 +01:00
parent 18eeee536d
commit 4e67aa413e

View File

@ -76,7 +76,7 @@ ASTPointer<SourceUnit> parseTextAndResolveNamesWithChecks(std::string const& _so
}
catch(boost::exception const& _e)
{
auto msg = std::string("Parsing text and resolving nanes failed with: \n") + boost::diagnostic_information(_e);
auto msg = std::string("Parsing text and resolving names failed with: \n") + boost::diagnostic_information(_e);
BOOST_FAIL(msg);
}
return sourceUnit;
@ -642,7 +642,7 @@ BOOST_AUTO_TEST_CASE(state_variable_accessors)
ASTPointer<SourceUnit> source;
ContractDefinition const* contract;
BOOST_CHECK_NO_THROW(source = parseTextAndResolveNamesWithChecks(text));
BOOST_CHECK((contract = retrieveContract(source, 0)) != nullptr);
BOOST_REQUIRE((contract = retrieveContract(source, 0)) != nullptr);
FunctionDescription function = retrieveFunctionBySignature(contract, "foo()");
BOOST_CHECK_MESSAGE(function.getDeclaration() != nullptr, "Could not find the accessor function");
auto returnParams = function.getReturnParameters();