Skip to content

Commit 26296eb

Browse files
author
MacroFake
committed
Merge bitcoin/bitcoin#25025: test: Remove boost::split from rpc_tests.cpp
fad35e9 test: Remove boost::split from rpc_tests.cpp (MacroFake) Pull request description: No need for boost, as there are no tabs. Can be tested with: ```diff diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp index 50b5078..ad6a888ad0 100644 --- a/src/test/rpc_tests.cpp +++ b/src/test/rpc_tests.cpp @@ -29,6 +29,7 @@ public: UniValue RPCTestingSetup::CallRPC(std::string args) { +Assert(args.find('\t')==std::string::npos); std::vector<std::string> vArgs; boost::split(vArgs, args, boost::is_any_of(" \t")); std::string strMethod = vArgs[0]; ACKs for top commit: fanquake: utACK fad35e9 Tree-SHA512: 3df789a222b407d61ad549adc4bbded00705d7c3db07472c31ce0e82216fe3ae27724b7f0ee3e85084bdf405cc28185e85487c9a7001620d6654fda77bab8eb3
2 parents 194b414 + fad35e9 commit 26296eb

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/test/rpc_tests.cpp

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,21 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#include <rpc/client.h>
6-
#include <rpc/server.h>
7-
#include <rpc/util.h>
8-
95
#include <core_io.h>
106
#include <interfaces/chain.h>
117
#include <node/context.h>
8+
#include <rpc/blockchain.h>
9+
#include <rpc/client.h>
10+
#include <rpc/server.h>
11+
#include <rpc/util.h>
1212
#include <test/util/setup_common.h>
13+
#include <univalue.h>
1314
#include <util/time.h>
1415

1516
#include <any>
1617

17-
#include <boost/algorithm/string.hpp>
1818
#include <boost/test/unit_test.hpp>
1919

20-
#include <univalue.h>
21-
22-
#include <rpc/blockchain.h>
23-
2420
class RPCTestingSetup : public TestingSetup
2521
{
2622
public:
@@ -29,8 +25,7 @@ class RPCTestingSetup : public TestingSetup
2925

3026
UniValue RPCTestingSetup::CallRPC(std::string args)
3127
{
32-
std::vector<std::string> vArgs;
33-
boost::split(vArgs, args, boost::is_any_of(" \t"));
28+
std::vector<std::string> vArgs{SplitString(args, ' ')};
3429
std::string strMethod = vArgs[0];
3530
vArgs.erase(vArgs.begin());
3631
JSONRPCRequest request;

0 commit comments

Comments
 (0)