Skip to content

Commit

Permalink
util_SettingsMerge test cleanup
Browse files Browse the repository at this point in the history
Followup to bitcoin#15869. Treat "-wallet" as the network-specific argument in test
instead of "-server", to make test output clearer and be more consistent with
bitcoind. Update embedded hash to match changed output from this.
  • Loading branch information
ryanofsky authored and Michael Polzer committed Aug 28, 2019
1 parent edcf910 commit 5dc01c6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/util_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ BOOST_AUTO_TEST_CASE(util_GetChainName)

// Test different ways settings can be merged, and verify results. This test can
// be used to confirm that updates to settings code don't change behavior
// unintentially.
// unintentionally.
//
// The test covers:
//
Expand Down Expand Up @@ -687,7 +687,7 @@ struct SettingsMergeTestingSetup : public BasicTestingSetup {
// Regression test covering different ways config settings can be merged. The
// test parses and merges settings, representing the results as strings that get
// compared against an expected hash. To debug, the result strings can be dumped
// to a file (see below).
// to a file (see comments below).
BOOST_FIXTURE_TEST_CASE(util_SettingsMerge, SettingsMergeTestingSetup)
{
CHash256 out_sha;
Expand All @@ -706,7 +706,7 @@ BOOST_FIXTURE_TEST_CASE(util_SettingsMerge, SettingsMergeTestingSetup)
desc += network;
parser.m_network = network;

const std::string& name = net_specific ? "server" : "wallet";
const std::string& name = net_specific ? "wallet" : "server";
const std::string key = "-" + name;
parser.AddArg(key, name, false, OptionsCategory::OPTIONS);
if (net_specific) parser.SetNetworkOnlyArg(key);
Expand Down Expand Up @@ -801,7 +801,7 @@ BOOST_FIXTURE_TEST_CASE(util_SettingsMerge, SettingsMergeTestingSetup)
// Results file is formatted like:
//
// <input> || <IsArgSet/IsArgNegated/GetArg output> | <GetArgs output> | <GetUnsuitable output>
BOOST_CHECK_EQUAL(out_sha_hex, "80964e17fbd3c5569d3c824d032e28e2d319ef57494735b0e76eb7aad9957f2c");
BOOST_CHECK_EQUAL(out_sha_hex, "f4281d9bff4c0b398ff118386e3a40caa6bac7645e17b296d6a10b95bff632ae");
}

BOOST_AUTO_TEST_CASE(util_FormatMoney)
Expand Down

0 comments on commit 5dc01c6

Please sign in to comment.