Adds support for arrays in function signatures.

This commit is contained in:
Erik Kundt
2019-03-06 16:47:00 +01:00
parent 9193fcb99f
commit ab31c28ed9
3 changed files with 30 additions and 1 deletions
@@ -460,6 +460,20 @@ BOOST_AUTO_TEST_CASE(call_multiple_arguments_mixed_format)
);
}
BOOST_AUTO_TEST_CASE(call_signature_array)
{
char const* source = R"(
// f(uint256[]) ->
// f(uint256[3]) ->
// f(uint256[3][][], uint8[9]) ->
)";
auto const calls = parse(source);
BOOST_REQUIRE_EQUAL(calls.size(), 3);
testFunctionCall(calls.at(0), Mode::SingleLine, "f(uint256[])", false);
testFunctionCall(calls.at(1), Mode::SingleLine, "f(uint256[3])", false);
testFunctionCall(calls.at(2), Mode::SingleLine, "f(uint256[3][][],uint8[9])", false);
}
BOOST_AUTO_TEST_CASE(call_signature_valid)
{
char const* source = R"(