aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2019-07-27 12:06:32 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2019-07-27 15:05:14 +0300
commitfb4b9f9e3b433d8848832e2c2686cf7b1f212a5e (patch)
treed0462df9587009555b19ddf6b64e8275d046f860 /src/test
parent1b4b9422cad28d1bead24ff5fd472536954cfaf9 (diff)
scripted-diff: Use ArgsManager::DEBUG_ONLY flag
-BEGIN VERIFY SCRIPT- sed -i 's/unsigned int flags, const bool debug_only,/unsigned int flags,/' src/util/system.h src/util/system.cpp sed -i 's/ArgsManager::NONE, debug_only/flags, false/' src/util/system.cpp sed -i 's/arg.second.m_debug_only/(arg.second.m_flags \& ArgsManager::DEBUG_ONLY)/' src/util/system.cpp sed -i 's/ArgsManager::ALLOW_ANY, true, OptionsCategory::/ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::/' $(git grep --files-with-matches 'AddArg(' src) sed -i 's/ArgsManager::ALLOW_ANY, false, OptionsCategory::/ArgsManager::ALLOW_ANY, OptionsCategory::/' $(git grep --files-with-matches 'AddArg(' src) -END VERIFY SCRIPT-
Diffstat (limited to 'src/test')
-rw-r--r--src/test/getarg_tests.cpp2
-rw-r--r--src/test/util_tests.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/test/getarg_tests.cpp b/src/test/getarg_tests.cpp
index 82eb3eeec0..e36ba4b3c1 100644
--- a/src/test/getarg_tests.cpp
+++ b/src/test/getarg_tests.cpp
@@ -36,7 +36,7 @@ static void SetupArgs(const std::vector<std::string>& args)
{
gArgs.ClearArgs();
for (const std::string& arg : args) {
- gArgs.AddArg(arg, "", ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ gArgs.AddArg(arg, "", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
}
}
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index d154cd6c31..f0ed0962a8 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -157,7 +157,7 @@ struct TestArgsManager : public ArgsManager
void SetupArgs(int argv, const char* args[])
{
for (int i = 0; i < argv; ++i) {
- AddArg(args[i], "", ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ AddArg(args[i], "", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
}
}
using ArgsManager::ReadConfigStream;
@@ -682,7 +682,7 @@ BOOST_FIXTURE_TEST_CASE(util_ArgsMerge, ArgsMergeTestingSetup)
const std::string& name = net_specific ? "wallet" : "server";
const std::string key = "-" + name;
- parser.AddArg(key, name, ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ parser.AddArg(key, name, ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
if (net_specific) parser.SetNetworkOnlyArg(key);
auto args = GetValues(arg_actions, section, name, "a");
@@ -809,8 +809,8 @@ BOOST_FIXTURE_TEST_CASE(util_ChainMerge, ChainMergeTestingSetup)
ForEachMergeSetup([&](const ActionList& arg_actions, const ActionList& conf_actions) {
TestArgsManager parser;
LOCK(parser.cs_args);
- parser.AddArg("-regtest", "regtest", ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
- parser.AddArg("-testnet", "testnet", ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
+ parser.AddArg("-regtest", "regtest", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
+ parser.AddArg("-testnet", "testnet", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
auto arg = [](Action action) { return action == ENABLE_TEST ? "-testnet=1" :
action == DISABLE_TEST ? "-testnet=0" :