Various small fixes for Sol Automatic Accessors

This commit is contained in:
Lefteris Karapetsas 2015-01-26 09:48:29 +01:00
parent 1aa77295e5
commit cc906541f6
2 changed files with 4 additions and 4 deletions

View File

@ -645,9 +645,9 @@ BOOST_AUTO_TEST_CASE(state_variable_accessors)
BOOST_CHECK((contract = retrieveContract(source, 0)) != nullptr);
FunctionDescription function = retrieveFunctionBySignature(contract, "foo()");
BOOST_CHECK_MESSAGE(function.getDeclaration() != nullptr, "Could not find the accessor function");
// vector<ParamDescription> const expected({ParamDescription("", "uint256")});
// BOOST_CHECK_EQUAL_COLLECTIONS(function.getReturnParameters().begin(), function.getReturnParameters().end(),
// expected.begin(), expected.end());
auto returnParams = function.getReturnParameters();
BOOST_CHECK_EQUAL(returnParams.at(0).getType(), "uint256");
BOOST_CHECK(function.isConstant());
}
BOOST_AUTO_TEST_CASE(private_state_variable)

View File

@ -204,7 +204,7 @@ BOOST_AUTO_TEST_CASE(multiline_function_documentation)
BOOST_REQUIRE_NO_THROW(contract = parseText(text));
auto functions = contract->getDefinedFunctions();
BOOST_REQUIRE_NO_THROW(function = functions.at(1)); // 1 since, 0 is the index of stateVar accessor
BOOST_REQUIRE_NO_THROW(function = functions.at(0));
checkFunctionNatspec(function, "This is a test function\n"
" and it has 2 lines");
}