aboutsummaryrefslogtreecommitdiffstats
path: root/test/contracts/Wallet.cpp
diff options
context:
space:
mode:
authorDimitry <winsvega@mail.ru>2016-06-14 23:01:57 +0800
committerchriseth <c@ethdev.com>2016-06-29 05:18:55 +0800
commit763faf7b0e56cde9845772de5226c9b6f1a5d80a (patch)
tree14660008fc89ee655fd51563c268d45da43b5596 /test/contracts/Wallet.cpp
parentce2258b71e632e01b3f50d47704352065cb01b5d (diff)
downloaddexon-solidity-763faf7b0e56cde9845772de5226c9b6f1a5d80a.tar.gz
dexon-solidity-763faf7b0e56cde9845772de5226c9b6f1a5d80a.tar.zst
dexon-solidity-763faf7b0e56cde9845772de5226c9b6f1a5d80a.zip
replace BalanceAt
add addressHasCode remove m_state and sealengine
Diffstat (limited to 'test/contracts/Wallet.cpp')
-rw-r--r--test/contracts/Wallet.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/contracts/Wallet.cpp b/test/contracts/Wallet.cpp
index 060525b0..29fe5b8d 100644
--- a/test/contracts/Wallet.cpp
+++ b/test/contracts/Wallet.cpp
@@ -555,17 +555,17 @@ BOOST_AUTO_TEST_CASE(multisig_value_transfer)
BOOST_REQUIRE(callContractFunction("changeRequirement(uint256)", u256(3)) == encodeArgs());
// check that balance is and stays zero at destination address
h256 opHash("6244b4fa93f73e09db0ae52750095ca0364a76b72bc01723c97011fcb876cc9e");
- BOOST_CHECK_EQUAL(m_state.balance(Address(0x05)), 0);
+ BOOST_CHECK_EQUAL(balanceAt(Address(0x05)), 0);
m_sender = Address(0x12);
BOOST_REQUIRE(callContractFunction("execute(address,uint256,bytes)", h256(0x05), 100, 0x60, 0x00) == encodeArgs(opHash));
- BOOST_CHECK_EQUAL(m_state.balance(Address(0x05)), 0);
+ BOOST_CHECK_EQUAL(balanceAt(Address(0x05)), 0);
m_sender = Address(0x13);
BOOST_REQUIRE(callContractFunction("execute(address,uint256,bytes)", h256(0x05), 100, 0x60, 0x00) == encodeArgs(opHash));
- BOOST_CHECK_EQUAL(m_state.balance(Address(0x05)), 0);
+ BOOST_CHECK_EQUAL(balanceAt(Address(0x05)), 0);
m_sender = Address(0x14);
BOOST_REQUIRE(callContractFunction("execute(address,uint256,bytes)", h256(0x05), 100, 0x60, 0x00) == encodeArgs(opHash));
// now it should go through
- BOOST_CHECK_EQUAL(m_state.balance(Address(0x05)), 100);
+ BOOST_CHECK_EQUAL(balanceAt(Address(0x05)), 100);
}
BOOST_AUTO_TEST_CASE(revoke_addOwner)
@@ -606,22 +606,22 @@ BOOST_AUTO_TEST_CASE(revoke_transaction)
// create a transaction
Address deployer = m_sender;
h256 opHash("6244b4fa93f73e09db0ae52750095ca0364a76b72bc01723c97011fcb876cc9e");
- BOOST_CHECK_EQUAL(m_state.balance(Address(0x05)), 0);
+ BOOST_CHECK_EQUAL(balanceAt(Address(0x05)), 0);
m_sender = Address(0x12);
BOOST_REQUIRE(callContractFunction("execute(address,uint256,bytes)", h256(0x05), 100, 0x60, 0x00) == encodeArgs(opHash));
- BOOST_CHECK_EQUAL(m_state.balance(Address(0x05)), 0);
+ BOOST_CHECK_EQUAL(balanceAt(Address(0x05)), 0);
m_sender = Address(0x13);
BOOST_REQUIRE(callContractFunction("execute(address,uint256,bytes)", h256(0x05), 100, 0x60, 0x00) == encodeArgs(opHash));
- BOOST_CHECK_EQUAL(m_state.balance(Address(0x05)), 0);
+ BOOST_CHECK_EQUAL(balanceAt(Address(0x05)), 0);
m_sender = Address(0x12);
BOOST_REQUIRE(callContractFunction("revoke(bytes32)", opHash) == encodeArgs());
m_sender = deployer;
BOOST_REQUIRE(callContractFunction("execute(address,uint256,bytes)", h256(0x05), 100, 0x60, 0x00) == encodeArgs(opHash));
- BOOST_CHECK_EQUAL(m_state.balance(Address(0x05)), 0);
+ BOOST_CHECK_EQUAL(balanceAt(Address(0x05)), 0);
m_sender = Address(0x14);
BOOST_REQUIRE(callContractFunction("execute(address,uint256,bytes)", h256(0x05), 100, 0x60, 0x00) == encodeArgs(opHash));
// now it should go through
- BOOST_CHECK_EQUAL(m_state.balance(Address(0x05)), 100);
+ BOOST_CHECK_EQUAL(balanceAt(Address(0x05)), 100);
}
BOOST_AUTO_TEST_CASE(daylimit)
@@ -637,27 +637,27 @@ BOOST_AUTO_TEST_CASE(daylimit)
BOOST_REQUIRE(callContractFunction("changeRequirement(uint256)", u256(3)) == encodeArgs());
// try to send tx over daylimit
- BOOST_CHECK_EQUAL(m_state.balance(Address(0x05)), 0);
+ BOOST_CHECK_EQUAL(balanceAt(Address(0x05)), 0);
m_sender = Address(0x12);
BOOST_REQUIRE(
callContractFunction("execute(address,uint256,bytes)", h256(0x05), 150, 0x60, 0x00) !=
encodeArgs(u256(0))
);
- BOOST_CHECK_EQUAL(m_state.balance(Address(0x05)), 0);
+ BOOST_CHECK_EQUAL(balanceAt(Address(0x05)), 0);
// try to send tx under daylimit by stranger
m_sender = Address(0x77);
BOOST_REQUIRE(
callContractFunction("execute(address,uint256,bytes)", h256(0x05), 90, 0x60, 0x00) ==
encodeArgs(u256(0))
);
- BOOST_CHECK_EQUAL(m_state.balance(Address(0x05)), 0);
+ BOOST_CHECK_EQUAL(balanceAt(Address(0x05)), 0);
// now send below limit by owner
m_sender = Address(0x12);
BOOST_REQUIRE(
callContractFunction("execute(address,uint256,bytes)", h256(0x05), 90, 0x60, 0x00) ==
encodeArgs(u256(0))
);
- BOOST_CHECK_EQUAL(m_state.balance(Address(0x05)), 90);
+ BOOST_CHECK_EQUAL(balanceAt(Address(0x05)), 90);
}
BOOST_AUTO_TEST_CASE(daylimit_constructor)