diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2020-08-31 13:16:13 +0200 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2020-09-17 14:45:17 +0200 |
commit | fe42411b4b07b99c591855f5f00ad45dfeec8e30 (patch) | |
tree | 9b87f884e89db127a6580319c18868a7b9f74858 /src/test/miner_tests.cpp | |
parent | d2bb681f96fb327b4c4d5b2b113692ca22fdffbf (diff) |
test: move HasReason so it can be reused
Move the class `HasReason` from `miner_tests.cpp` to
`setup_common.h` so that it can be reused by other tests.
Diffstat (limited to 'src/test/miner_tests.cpp')
-rw-r--r-- | src/test/miner_tests.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index 62a0dc4241..8686012af7 100644 --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -36,17 +36,6 @@ struct MinerTestingSetup : public TestingSetup { BOOST_FIXTURE_TEST_SUITE(miner_tests, MinerTestingSetup) -// BOOST_CHECK_EXCEPTION predicates to check the specific validation error -class HasReason { -public: - explicit HasReason(const std::string& reason) : m_reason(reason) {} - bool operator() (const std::runtime_error& e) const { - return std::string(e.what()).find(m_reason) != std::string::npos; - }; -private: - const std::string m_reason; -}; - static CFeeRate blockMinFeeRate = CFeeRate(DEFAULT_BLOCK_MIN_TX_FEE); BlockAssembler MinerTestingSetup::AssemblerForTest(const CChainParams& params) |