aboutsummaryrefslogtreecommitdiffstats
path: root/SolidityEndToEndTest.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-02-03 00:52:50 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-02-03 00:52:50 +0800
commit3b0ca66cd2c211f6678f26f0f97fb4552691f043 (patch)
tree9590ddcde9ddb6cd855a702f034f72de228bac16 /SolidityEndToEndTest.cpp
parent33f86b8af3add9c8988ad9ec1ae874cf937e2e35 (diff)
downloaddexon-solidity-3b0ca66cd2c211f6678f26f0f97fb4552691f043.tar
dexon-solidity-3b0ca66cd2c211f6678f26f0f97fb4552691f043.tar.gz
dexon-solidity-3b0ca66cd2c211f6678f26f0f97fb4552691f043.tar.bz2
dexon-solidity-3b0ca66cd2c211f6678f26f0f97fb4552691f043.tar.lz
dexon-solidity-3b0ca66cd2c211f6678f26f0f97fb4552691f043.tar.xz
dexon-solidity-3b0ca66cd2c211f6678f26f0f97fb4552691f043.tar.zst
dexon-solidity-3b0ca66cd2c211f6678f26f0f97fb4552691f043.zip
Accessors for multiple mappings implemented
Diffstat (limited to 'SolidityEndToEndTest.cpp')
-rw-r--r--SolidityEndToEndTest.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp
index 63a8ebcd..9a04e02d 100644
--- a/SolidityEndToEndTest.cpp
+++ b/SolidityEndToEndTest.cpp
@@ -925,16 +925,19 @@ BOOST_AUTO_TEST_CASE(complex_accessors)
" mapping(uint256 => string4) to_string_map;\n"
" mapping(uint256 => bool) to_bool_map;\n"
" mapping(uint256 => uint256) to_uint_map;\n"
+ " mapping(uint256 => mapping(uint256 => uint256)) to_multiple_map;\n"
" function test() {\n"
" to_string_map[42] = \"24\";\n"
" to_bool_map[42] = false;\n"
" to_uint_map[42] = 12;\n"
+ " to_multiple_map[42][23] = 31;\n"
" }\n"
"}\n";
compileAndRun(sourceCode);
BOOST_CHECK(callContractFunction("to_string_map(uint256)", 42) == encodeArgs("24"));
BOOST_CHECK(callContractFunction("to_bool_map(uint256)", 42) == encodeArgs(false));
BOOST_CHECK(callContractFunction("to_uint_map(uint256)", 42) == encodeArgs(12));
+ BOOST_CHECK(callContractFunction("to_multiple_map(uint256,uint256)", 42, 23) == encodeArgs(31));
}
BOOST_AUTO_TEST_CASE(balance)