aboutsummaryrefslogtreecommitdiff
path: root/src/test/getarg_tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/getarg_tests.cpp')
-rw-r--r--src/test/getarg_tests.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/test/getarg_tests.cpp b/src/test/getarg_tests.cpp
index c065e25676..8a42344642 100644
--- a/src/test/getarg_tests.cpp
+++ b/src/test/getarg_tests.cpp
@@ -1,9 +1,10 @@
-// Copyright (c) 2012-2017 The Bitcoin Core developers
+// Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#include <util.h>
-#include <test/test_bitcoin.h>
+#include <util/strencodings.h>
+#include <util/system.h>
+#include <test/setup_common.h>
#include <string>
#include <vector>
@@ -17,18 +18,18 @@ static void ResetArgs(const std::string& strArg)
{
std::vector<std::string> vecArg;
if (strArg.size())
- boost::split(vecArg, strArg, boost::is_space(), boost::token_compress_on);
+ boost::split(vecArg, strArg, IsSpace, boost::token_compress_on);
// Insert dummy executable name:
vecArg.insert(vecArg.begin(), "testbitcoin");
// Convert to char*:
std::vector<const char*> vecChar;
- for (std::string& s : vecArg)
+ for (const std::string& s : vecArg)
vecChar.push_back(s.c_str());
std::string error;
- gArgs.ParseParameters(vecChar.size(), vecChar.data(), error);
+ BOOST_CHECK(gArgs.ParseParameters(vecChar.size(), vecChar.data(), error));
}
static void SetupArgs(const std::vector<std::string>& args)