diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2019-07-27 10:48:25 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2019-07-27 15:05:14 +0300 |
commit | 1b4b9422cad28d1bead24ff5fd472536954cfaf9 (patch) | |
tree | 32600f1aff34a01617d445fd598fb1b15099bf2e /src/test/util_tests.cpp | |
parent | 265c1b58d89b7b6fb30468ba402d7f75cc59a510 (diff) | |
download | bitcoin-1b4b9422cad28d1bead24ff5fd472536954cfaf9.tar.xz |
scripted-diff: Use Flags enum in AddArg()
-BEGIN VERIFY SCRIPT-
sed -i 's/const bool debug_only,/unsigned int flags, &/' src/util/system.h src/util/system.cpp
sed -i -E 's/(true|false), OptionsCategory::/ArgsManager::ALLOW_ANY, &/' $(git grep --files-with-matches 'AddArg(' src)
-END VERIFY SCRIPT-
Diffstat (limited to 'src/test/util_tests.cpp')
-rw-r--r-- | src/test/util_tests.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index 9960573b33..d154cd6c31 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], "", false, OptionsCategory::OPTIONS); + AddArg(args[i], "", ArgsManager::ALLOW_ANY, false, 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, false, OptionsCategory::OPTIONS); + parser.AddArg(key, name, ArgsManager::ALLOW_ANY, false, 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", false, OptionsCategory::OPTIONS); - parser.AddArg("-testnet", "testnet", false, OptionsCategory::OPTIONS); + parser.AddArg("-regtest", "regtest", ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); + parser.AddArg("-testnet", "testnet", ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); auto arg = [](Action action) { return action == ENABLE_TEST ? "-testnet=1" : action == DISABLE_TEST ? "-testnet=0" : |