test: refactor: Give unit test functions access to test state

Add unit test subclasses as needed so unit test functions that need to access
members like m_rng can reference it directly.
This commit is contained in:
Ryan Ofsky
2024-08-14 07:58:26 -04:00
committed by MarcoFalke
parent fab023e177
commit 3dc527f460
16 changed files with 145 additions and 81 deletions

View File

@@ -20,6 +20,7 @@
namespace {
struct BIP324Test : BasicTestingSetup {
void TestBIP324PacketVector(
uint32_t in_idx,
const std::string& in_priv_ours_hex,
@@ -155,10 +156,11 @@ void TestBIP324PacketVector(
}
}
}
}; // struct BIP324Test
} // namespace
BOOST_FIXTURE_TEST_SUITE(bip324_tests, BasicTestingSetup)
BOOST_FIXTURE_TEST_SUITE(bip324_tests, BIP324Test)
BOOST_AUTO_TEST_CASE(packet_test_vectors) {
// BIP324 key derivation uses network magic in the HKDF process. We use mainnet params here