aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityEndToEndTest.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-02-07 00:54:05 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-02-24 08:18:18 +0800
commit81006dae98ee18c33994af0274de10857774ff70 (patch)
treef12a3778dacf688b76df7ecabcc1ad24954e36aa /test/libsolidity/SolidityEndToEndTest.cpp
parentba437ef31a95f40f510a475e8b329f061e929b90 (diff)
downloaddexon-solidity-81006dae98ee18c33994af0274de10857774ff70.tar.gz
dexon-solidity-81006dae98ee18c33994af0274de10857774ff70.tar.zst
dexon-solidity-81006dae98ee18c33994af0274de10857774ff70.zip
Support gas modifier on addr.transfer()
Diffstat (limited to 'test/libsolidity/SolidityEndToEndTest.cpp')
-rw-r--r--test/libsolidity/SolidityEndToEndTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp
index cb0cc168..30430aef 100644
--- a/test/libsolidity/SolidityEndToEndTest.cpp
+++ b/test/libsolidity/SolidityEndToEndTest.cpp
@@ -1693,6 +1693,10 @@ BOOST_AUTO_TEST_CASE(transfer_ether)
function b(address addr, uint amount) {
addr.transfer(amount);
}
+ function c(address addr, uint amount, uint gas) returns (uint) {
+ addr.transfer.gas(gas)(amount);
+ return this.balance;
+ }
}
contract B {
@@ -1715,6 +1719,8 @@ BOOST_AUTO_TEST_CASE(transfer_ether)
BOOST_CHECK_EQUAL(balanceAt(m_contractAddress), 10);
BOOST_CHECK(callContractFunction("b(address,uint256)", nonPayableRecipient, 10) == encodeArgs());
BOOST_CHECK(callContractFunction("b(address,uint256)", oogRecipient, 10) == encodeArgs());
+ BOOST_CHECK(callContractFunction("c(address,uint256,uint256)", payableRecipient, 1, 9000) == encodeArgs(9));
+ BOOST_CHECK(callContractFunction("c(address,uint256,uint256)", payableRecipient, 1, 0) == encodeArgs());
}
BOOST_AUTO_TEST_CASE(log0)