Draft: [backport] [qa] Add test for ArgsManager::GetChainName
Summary
This is a backport of https://github.com/Bitcoin-ABC/bitcoin-abc/commit/b2500c3d81054fc8dd10e35690d69faa6c282c8c See https://reviews.bitcoinabc.org/D5860
-
util_SettingsMerge
test cleanup
Followup to #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.
- Add unit test
NextString
,ForEachNoDup
functions
Remove testcase generating code from util_SettingsMerge
so it can be
reused in new tests.
The hash value expected in util_SettingsMerge
changes as a result of
this, but only because the testcases are generated in a different order,
not because any cases are added or removed. It is possible to verify
this with:
ninja test_bitcoin
ARGS_MERGE_TEST_OUT=new.txt src/test/test_bitcoin --run_test=util_tests/util_ArgsMerge
git checkout HEAD~1
ninja test_bitcoin
SETTINGS_MERGE_TEST_OUT=old.txt src/test/test_bitcoin --run_test=util_tests/util_SettingsMerge
diff -u <(sort old.txt) <(sort new.txt)
The new output is a little more readable, with simpler testcases sorted first.
- Add test for
ArgsManager::GetChainName
There was some test coverage previously, but it was limited and didn't test conflicting and negated arguments.
This is a backport of Core PR15988
Test plan
ninja all check-all