Skip to content

Commit af6ab7f

Browse files
committed
Use BOOST_REQUIRE() and stop at the first failure
1 parent f9357db commit af6ab7f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/RPCSession.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ string RPCSession::eth_getStorageRoot(string const& _address, string const& _blo
191191

192192
void RPCSession::personal_unlockAccount(string const& _address, string const& _password, int _duration)
193193
{
194-
BOOST_CHECK(rpcCall("personal_unlockAccount", { quote(_address), quote(_password), to_string(_duration) }) == true);
194+
BOOST_REQUIRE(rpcCall("personal_unlockAccount", { quote(_address), quote(_password), to_string(_duration) }) == true);
195195
}
196196

197197
string RPCSession::personal_newAccount(string const& _password)
@@ -235,18 +235,18 @@ void RPCSession::test_setChainParams(vector<string> const& _accounts)
235235

236236
void RPCSession::test_setChainParams(string const& _config)
237237
{
238-
BOOST_CHECK(rpcCall("test_setChainParams", { _config }) == true);
238+
BOOST_REQUIRE(rpcCall("test_setChainParams", { _config }) == true);
239239
}
240240

241241
void RPCSession::test_rewindToBlock(size_t _blockNr)
242242
{
243-
BOOST_CHECK(rpcCall("test_rewindToBlock", { to_string(_blockNr) }) == true);
243+
BOOST_REQUIRE(rpcCall("test_rewindToBlock", { to_string(_blockNr) }) == true);
244244
}
245245

246246
void RPCSession::test_mineBlocks(int _number)
247247
{
248248
u256 startBlock = fromBigEndian<u256>(fromHex(rpcCall("eth_blockNumber").asString()));
249-
BOOST_CHECK(rpcCall("test_mineBlocks", { to_string(_number) }, true) == true);
249+
BOOST_REQUIRE(rpcCall("test_mineBlocks", { to_string(_number) }, true) == true);
250250

251251
bool mined = false;
252252

@@ -285,7 +285,7 @@ void RPCSession::test_mineBlocks(int _number)
285285

286286
void RPCSession::test_modifyTimestamp(size_t _timestamp)
287287
{
288-
BOOST_CHECK(rpcCall("test_modifyTimestamp", { to_string(_timestamp) }) == true);
288+
BOOST_REQUIRE(rpcCall("test_modifyTimestamp", { to_string(_timestamp) }) == true);
289289
}
290290

291291
Json::Value RPCSession::rpcCall(string const& _methodName, vector<string> const& _args, bool _canFail)

0 commit comments

Comments
 (0)