HomePhabricator

test: move HasReason so it can be reused

Description

test: move HasReason so it can be reused

Summary:

Move the class `HasReason` from `miner_tests.cpp` to
`setup_common.h` so that it can be reused by other tests.

Partial backport (2/4) of core PR19485:
https://github.com/bitcoin/bitcoin/pull/19845/commits/fe42411b4b07b99c591855f5f00ad45dfeec8e30

Depends on D9186.

Test Plan:

ninja check-bitcoin-miner_tests

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D9187

Details

Provenance
Vasil Dimov <vd@FreeBSD.org>Authored on Aug 31 2020, 11:16
FabienCommitted on Feb 9 2021, 16:58
FabienPushed on Feb 9 2021, 17:00
Reviewer
Restricted Project
Differential Revision
D9187: test: move HasReason so it can be reused
Parents
rABC7af7f8499288: util: move HasPrefix() so it can be reused
Branches
Unknown
Tags
Unknown