aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-04-30 09:59:40 +0100
committerfanquake <fanquake@gmail.com>2022-04-30 10:00:20 +0100
commit23daa86ec132cf1208b8c1b13463e58e57a26a20 (patch)
tree57d78694a6f653072ee0d785a717a193fe134440 /src
parentc086ebaf74a8f16ab5a175ce9b625770dee0fe9a (diff)
parentfafa7276126d21d7e2f723673b64382e16a902d9 (diff)
Merge bitcoin/bitcoin#25027: test: Remove boost::split from getarg_tests.cpp
fafa7276126d21d7e2f723673b64382e16a902d9 test: Remove boost::split from getarg_tests.cpp (MacroFake) Pull request description: Only single spaces are used, so no need for boost. Can be tested with: ```diff diff --git a/src/test/getarg_tests.cpp b/src/test/getarg_tests.cpp index c877105fe7..a834830490 100644 --- a/src/test/getarg_tests.cpp +++ b/src/test/getarg_tests.cpp @@ -21,8 +21,11 @@ BOOST_FIXTURE_TEST_SUITE(getarg_tests, BasicTestingSetup) void ResetArgs(ArgsManager& local_args, const std::string& strArg) { std::vector<std::string> vecArg; - if (strArg.size()) + if (strArg.size()) { boost::split(vecArg, strArg, IsSpace, boost::token_compress_on); + auto vecArg2{SplitString(strArg, ' ')}; + assert(vecArg2 == vecArg); + } // Insert dummy executable name: vecArg.insert(vecArg.begin(), "testbitcoin"); ACKs for top commit: fanquake: utACK fafa7276126d21d7e2f723673b64382e16a902d9 - After this, the last usage of `<boost/algorithm/string.hpp>` is in `httprpc.cpp`. Tree-SHA512: 038af095cfb5240216305919cdeeb12d8e3ff0424520b99785bff5353a47dfcacdc049b927d7316b13e17a3c19b5f7549c9db7c4b5f2fa78ff1816515ca28d9d
Diffstat (limited to 'src')
-rw-r--r--src/test/getarg_tests.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/getarg_tests.cpp b/src/test/getarg_tests.cpp
index c877105fe7..70dd137e22 100644
--- a/src/test/getarg_tests.cpp
+++ b/src/test/getarg_tests.cpp
@@ -13,7 +13,6 @@
#include <utility>
#include <vector>
-#include <boost/algorithm/string.hpp>
#include <boost/test/unit_test.hpp>
BOOST_FIXTURE_TEST_SUITE(getarg_tests, BasicTestingSetup)
@@ -21,8 +20,9 @@ BOOST_FIXTURE_TEST_SUITE(getarg_tests, BasicTestingSetup)
void ResetArgs(ArgsManager& local_args, const std::string& strArg)
{
std::vector<std::string> vecArg;
- if (strArg.size())
- boost::split(vecArg, strArg, IsSpace, boost::token_compress_on);
+ if (strArg.size()) {
+ vecArg = SplitString(strArg, ' ');
+ }
// Insert dummy executable name:
vecArg.insert(vecArg.begin(), "testbitcoin");