aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityEndToEndTest.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-09-08 04:43:23 +0800
committerchriseth <c@ethdev.com>2015-09-08 04:43:23 +0800
commit9fc775269b2ab3eb25ab6f71c6d3a40106cedd97 (patch)
tree8a23705c8322e93fa4a8ac965a0a23c9ba727902 /test/libsolidity/SolidityEndToEndTest.cpp
parent6f4a39c183a905b8e07da59c17bfd25c2febbf7f (diff)
downloaddexon-solidity-9fc775269b2ab3eb25ab6f71c6d3a40106cedd97.tar
dexon-solidity-9fc775269b2ab3eb25ab6f71c6d3a40106cedd97.tar.gz
dexon-solidity-9fc775269b2ab3eb25ab6f71c6d3a40106cedd97.tar.bz2
dexon-solidity-9fc775269b2ab3eb25ab6f71c6d3a40106cedd97.tar.lz
dexon-solidity-9fc775269b2ab3eb25ab6f71c6d3a40106cedd97.tar.xz
dexon-solidity-9fc775269b2ab3eb25ab6f71c6d3a40106cedd97.tar.zst
dexon-solidity-9fc775269b2ab3eb25ab6f71c6d3a40106cedd97.zip
Revert "added check for string as mapping key for local var."
Diffstat (limited to 'test/libsolidity/SolidityEndToEndTest.cpp')
-rw-r--r--test/libsolidity/SolidityEndToEndTest.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp
index 3bb12f09..3f021708 100644
--- a/test/libsolidity/SolidityEndToEndTest.cpp
+++ b/test/libsolidity/SolidityEndToEndTest.cpp
@@ -5188,17 +5188,14 @@ BOOST_AUTO_TEST_CASE(storage_string_as_mapping_key_without_variable)
char const* sourceCode = R"(
contract Test {
mapping(string => uint) data;
- function f() returns (uint r, uint rl) {
- mapping(string => uint) dataLocal;
- dataLocal["abc"] = 2;
- rl = dataLocal["abc"];
- data["abc"] = 3;
- r = data["abc"];
+ function f() returns (uint) {
+ data["abc"] = 2;
+ return data["abc"];
}
}
)";
compileAndRun(sourceCode, 0, "Test");
- BOOST_CHECK(callContractFunction("f()") == encodeArgs(u256(3), u256(2)));
+ BOOST_CHECK(callContractFunction("f()") == encodeArgs(u256(2)));
}
BOOST_AUTO_TEST_SUITE_END()