diff options
author | Vlad Gluhovsky <gluk256@gmail.com> | 2015-06-07 23:28:16 +0800 |
---|---|---|
committer | Vlad Gluhovsky <gluk256@gmail.com> | 2015-06-07 23:28:16 +0800 |
commit | 2210af0c347aa1fba5af0f79a8f5d6ba9c885db0 (patch) | |
tree | ad60ccfa41f42cda6caf957c08d54ee8d6c5a270 /libsolidity/SolidityEndToEndTest.cpp | |
parent | 2eeaa750609123798429b298ff50144a9ed6fc62 (diff) | |
parent | 6f12765591059c936527129bb19078ec88866ffb (diff) | |
download | dexon-solidity-2210af0c347aa1fba5af0f79a8f5d6ba9c885db0.tar dexon-solidity-2210af0c347aa1fba5af0f79a8f5d6ba9c885db0.tar.gz dexon-solidity-2210af0c347aa1fba5af0f79a8f5d6ba9c885db0.tar.bz2 dexon-solidity-2210af0c347aa1fba5af0f79a8f5d6ba9c885db0.tar.lz dexon-solidity-2210af0c347aa1fba5af0f79a8f5d6ba9c885db0.tar.xz dexon-solidity-2210af0c347aa1fba5af0f79a8f5d6ba9c885db0.tar.zst dexon-solidity-2210af0c347aa1fba5af0f79a8f5d6ba9c885db0.zip |
Merge branch 'develop' of https://github.com/ethereum/cpp-ethereum into develop
Diffstat (limited to 'libsolidity/SolidityEndToEndTest.cpp')
-rw-r--r-- | libsolidity/SolidityEndToEndTest.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libsolidity/SolidityEndToEndTest.cpp b/libsolidity/SolidityEndToEndTest.cpp index 1d0f1fc2..89ed81e2 100644 --- a/libsolidity/SolidityEndToEndTest.cpp +++ b/libsolidity/SolidityEndToEndTest.cpp @@ -4187,6 +4187,28 @@ BOOST_AUTO_TEST_CASE(positive_integers_to_signed) BOOST_CHECK(callContractFunction("q()") == encodeArgs(250)); } +BOOST_AUTO_TEST_CASE(failing_send) +{ + char const* sourceCode = R"( + contract Helper { + uint[] data; + function () { + data[9]; // trigger exception + } + } + contract Main { + function callHelper(address _a) returns (bool r, uint bal) { + r = !_a.send(5); + bal = this.balance; + } + } + )"; + compileAndRun(sourceCode, 0, "Helper"); + u160 const c_helperAddress = m_contractAddress; + compileAndRun(sourceCode, 20, "Main"); + BOOST_REQUIRE(callContractFunction("callHelper(address)", c_helperAddress) == encodeArgs(true, 20)); +} + BOOST_AUTO_TEST_SUITE_END() } |