mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
added createing FunctionType from ArrayType VariableDeclaration
added test
This commit is contained in:
parent
fff3784c01
commit
32ae2ea75c
@ -966,6 +966,19 @@ BOOST_AUTO_TEST_CASE(simple_accessor)
|
|||||||
BOOST_CHECK(callContractFunction("data()") == encodeArgs(8));
|
BOOST_CHECK(callContractFunction("data()") == encodeArgs(8));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(array_accessor)
|
||||||
|
{
|
||||||
|
char const* sourceCode = R"(
|
||||||
|
contract test {
|
||||||
|
uint[8] datas;
|
||||||
|
function test() {
|
||||||
|
datas[2] = 8;
|
||||||
|
}
|
||||||
|
})";
|
||||||
|
compileAndRun(sourceCode);
|
||||||
|
BOOST_CHECK(callContractFunction("data(2)") == encodeArgs(8));
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(multiple_elementary_accessors)
|
BOOST_AUTO_TEST_CASE(multiple_elementary_accessors)
|
||||||
{
|
{
|
||||||
char const* sourceCode = "contract test {\n"
|
char const* sourceCode = "contract test {\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user