![]() |
Bitcoin Core 30.99.0
P2P Digital Currency
|
Basic testing setup. More...
#include <setup_common.h>
Public Member Functions | |
| void | SeedRandomForTest (SeedRand seed) |
| Seed the global RNG state and m_rng for testing and log the seed value. More... | |
| BasicTestingSetup (const ChainType chainType=ChainType::MAIN, TestOpts={}) | |
| ~BasicTestingSetup () | |
Public Attributes | |
| util::SignalInterrupt | m_interrupt |
| node::NodeContext | m_node |
| FastRandomContext | m_rng |
| fs::path | m_path_root |
| fs::path | m_path_lock |
| bool | m_has_custom_datadir {false} |
| ArgsManager | m_args |
| Test-specific arguments and settings. More... | |
Basic testing setup.
This just configures logging, data dir and chain parameters.
Definition at line 64 of file setup_common.h.
|
explicit |
| BasicTestingSetup::~BasicTestingSetup | ( | ) |
|
inline |
Seed the global RNG state and m_rng for testing and log the seed value.
This affects all randomness, except GetStrongRandBytes().
Definition at line 70 of file setup_common.h.
| ArgsManager BasicTestingSetup::m_args |
Test-specific arguments and settings.
This member is intended to be the primary source of settings for code being tested by unit tests. It exists to make tests more self-contained and reduce reliance on global state.
Usage guidelines:
Note: Currently, m_node.args points to gArgs for backwards compatibility. In the future, it will point to m_args to further isolate test environments.
Definition at line 99 of file setup_common.h.
| bool BasicTestingSetup::m_has_custom_datadir {false} |
Definition at line 81 of file setup_common.h.
| util::SignalInterrupt BasicTestingSetup::m_interrupt |
Definition at line 65 of file setup_common.h.
| node::NodeContext BasicTestingSetup::m_node |
Definition at line 66 of file setup_common.h.
| fs::path BasicTestingSetup::m_path_lock |
Definition at line 80 of file setup_common.h.
| fs::path BasicTestingSetup::m_path_root |
Definition at line 79 of file setup_common.h.
| FastRandomContext BasicTestingSetup::m_rng |
Definition at line 68 of file setup_common.h.