aboutsummaryrefslogtreecommitdiffstats
path: root/SolidityEndToEndTest.cpp
diff options
context:
space:
mode:
authorLiana Husikyan <liana@ethdev.com>2015-04-01 20:22:42 +0800
committerLiana Husikyan <liana@ethdev.com>2015-04-08 21:56:35 +0800
commit4d4a999db24b2baed1d72075a5f4ff5173942e24 (patch)
tree1f63ab5fd508489e193a6afaa801e912ec0efd31 /SolidityEndToEndTest.cpp
parenta33564fbccf2829cb591bbf8b8df42a456566e16 (diff)
downloaddexon-solidity-4d4a999db24b2baed1d72075a5f4ff5173942e24.tar
dexon-solidity-4d4a999db24b2baed1d72075a5f4ff5173942e24.tar.gz
dexon-solidity-4d4a999db24b2baed1d72075a5f4ff5173942e24.tar.bz2
dexon-solidity-4d4a999db24b2baed1d72075a5f4ff5173942e24.tar.lz
dexon-solidity-4d4a999db24b2baed1d72075a5f4ff5173942e24.tar.xz
dexon-solidity-4d4a999db24b2baed1d72075a5f4ff5173942e24.tar.zst
dexon-solidity-4d4a999db24b2baed1d72075a5f4ff5173942e24.zip
added implementation to append code for State variable accessor
fixed tests
Diffstat (limited to 'SolidityEndToEndTest.cpp')
-rw-r--r--SolidityEndToEndTest.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp
index 1b7f4129..ee9c1f69 100644
--- a/SolidityEndToEndTest.cpp
+++ b/SolidityEndToEndTest.cpp
@@ -970,8 +970,8 @@ BOOST_AUTO_TEST_CASE(array_accessor)
{
char const* sourceCode = R"(
contract test {
- uint[8] data;
- uint[] dynamicData;
+ uint[8] public data;
+ uint[] public dynamicData;
function test() {
data[2] = 8;
dynamicData.length = 3;
@@ -980,6 +980,7 @@ BOOST_AUTO_TEST_CASE(array_accessor)
}
)";
compileAndRun(sourceCode);
+ auto res = callContractFunction("data(uint256)", 2) ;
BOOST_CHECK(callContractFunction("data(uint256)", 2) == encodeArgs(8));
BOOST_CHECK(callContractFunction("data(uint256)", 8) == encodeArgs());
BOOST_CHECK(callContractFunction("dynamicData(uint256)", 2) == encodeArgs(8));
@@ -990,8 +991,8 @@ BOOST_AUTO_TEST_CASE(accessors_mapping_for_array)
{
char const* sourceCode = R"(
contract test {
- mapping(uint => uint[8]) data;
- mapping(uint => uint[]) dynamicData;
+ mapping(uint => uint[8]) public data;
+ mapping(uint => uint[]) public dynamicData;
function test() {
data[2][2] = 8;
dynamicData[2].length = 3;