mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adds support for arrays in function signatures.
This commit is contained in:
@@ -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"(
|
||||
|
||||
Reference in New Issue
Block a user