diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-08 20:31:26 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-09 05:24:29 +0800 |
commit | af6ab7fa916ac0f56c2caeae03be47bbefd8a50f (patch) | |
tree | 4cd8a71afff72090be832e99e2c42793768a550b | |
parent | f9357dbb22de8690940d605fc72ef6df4deb7f6b (diff) | |
download | dexon-solidity-af6ab7fa916ac0f56c2caeae03be47bbefd8a50f.tar.gz dexon-solidity-af6ab7fa916ac0f56c2caeae03be47bbefd8a50f.tar.zst dexon-solidity-af6ab7fa916ac0f56c2caeae03be47bbefd8a50f.zip |
Use BOOST_REQUIRE() and stop at the first failure
-rw-r--r-- | test/RPCSession.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/RPCSession.cpp b/test/RPCSession.cpp index ffdb48b1..5cd1bc7e 100644 --- a/test/RPCSession.cpp +++ b/test/RPCSession.cpp @@ -191,7 +191,7 @@ string RPCSession::eth_getStorageRoot(string const& _address, string const& _blo void RPCSession::personal_unlockAccount(string const& _address, string const& _password, int _duration) { - BOOST_CHECK(rpcCall("personal_unlockAccount", { quote(_address), quote(_password), to_string(_duration) }) == true); + BOOST_REQUIRE(rpcCall("personal_unlockAccount", { quote(_address), quote(_password), to_string(_duration) }) == true); } string RPCSession::personal_newAccount(string const& _password) @@ -235,18 +235,18 @@ void RPCSession::test_setChainParams(vector<string> const& _accounts) void RPCSession::test_setChainParams(string const& _config) { - BOOST_CHECK(rpcCall("test_setChainParams", { _config }) == true); + BOOST_REQUIRE(rpcCall("test_setChainParams", { _config }) == true); } void RPCSession::test_rewindToBlock(size_t _blockNr) { - BOOST_CHECK(rpcCall("test_rewindToBlock", { to_string(_blockNr) }) == true); + BOOST_REQUIRE(rpcCall("test_rewindToBlock", { to_string(_blockNr) }) == true); } void RPCSession::test_mineBlocks(int _number) { u256 startBlock = fromBigEndian<u256>(fromHex(rpcCall("eth_blockNumber").asString())); - BOOST_CHECK(rpcCall("test_mineBlocks", { to_string(_number) }, true) == true); + BOOST_REQUIRE(rpcCall("test_mineBlocks", { to_string(_number) }, true) == true); bool mined = false; @@ -285,7 +285,7 @@ void RPCSession::test_mineBlocks(int _number) void RPCSession::test_modifyTimestamp(size_t _timestamp) { - BOOST_CHECK(rpcCall("test_modifyTimestamp", { to_string(_timestamp) }) == true); + BOOST_REQUIRE(rpcCall("test_modifyTimestamp", { to_string(_timestamp) }) == true); } Json::Value RPCSession::rpcCall(string const& _methodName, vector<string> const& _args, bool _canFail) |