FunctionType now returns const ref for Declaration

This commit is contained in:
Lefteris Karapetsas 2015-01-29 18:44:14 +01:00
parent 866bd01bef
commit 5da76a3bbd

View File

@ -644,7 +644,7 @@ BOOST_AUTO_TEST_CASE(state_variable_accessors)
BOOST_CHECK_NO_THROW(source = parseTextAndResolveNamesWithChecks(text));
BOOST_REQUIRE((contract = retrieveContract(source, 0)) != nullptr);
FunctionTypePointer function = retrieveFunctionBySignature(contract, "foo()");
BOOST_CHECK_MESSAGE(function->getDeclaration() != nullptr, "Could not find the accessor function");
BOOST_REQUIRE(function->hasDeclaration());
auto returnParams = function->getReturnParameterTypeNames();
BOOST_CHECK_EQUAL(returnParams.at(0), "uint256");
BOOST_CHECK(function->isConstant());