aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-09-09 22:30:54 +0800
committerchriseth <c@ethdev.com>2015-09-09 22:30:54 +0800
commit3fc2561223c989885e1473cb29394bb07a26492f (patch)
tree232a2cfff4757ba62ab2b51210316f51a1668c71 /test
parent598696b641c20dee2fb9e88f1183a119b3939da2 (diff)
parent9fc775269b2ab3eb25ab6f71c6d3a40106cedd97 (diff)
downloaddexon-solidity-3fc2561223c989885e1473cb29394bb07a26492f.tar.gz
dexon-solidity-3fc2561223c989885e1473cb29394bb07a26492f.tar.zst
dexon-solidity-3fc2561223c989885e1473cb29394bb07a26492f.zip
Merge pull request #51 from ethereum/revert-25-sol_strings_as_mapping_keys
Revert "added check for string as mapping key for local var."
Diffstat (limited to 'test')
-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 c99d295d..aa423330 100644
--- a/test/libsolidity/SolidityEndToEndTest.cpp
+++ b/test/libsolidity/SolidityEndToEndTest.cpp
@@ -5220,17 +5220,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()