mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
Merge bitcoin/bitcoin#31083: doc: add doxygen for m_args in tests
1fe1b3ba8e
doc: doxygen comment for m_args usage in tests (willcl-ark) Pull request description: Closes: #25055 Add a doxygen comment to the `m_args` member in the unit test framework, clarifying its purpose and providing usage guidelines. ACKs for top commit: maflcko: lgtm ACK1fe1b3ba8e
brunoerg: ACK1fe1b3ba8e
Tree-SHA512: 9b8dc30e3b0d26c0cecec4599dc5addca519965603073d02f37fa0a46c488659958e327d9c25da8acdb4bb9b082a64455baaffb406ac11827d7f56a094522fce
This commit is contained in:
commit
2ac5ba24bf
1 changed files with 17 additions and 0 deletions
|
@ -75,6 +75,23 @@ struct BasicTestingSetup {
|
||||||
fs::path m_path_root;
|
fs::path m_path_root;
|
||||||
fs::path m_path_lock;
|
fs::path m_path_lock;
|
||||||
bool m_has_custom_datadir{false};
|
bool m_has_custom_datadir{false};
|
||||||
|
/** @brief 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:
|
||||||
|
* 1. Prefer using m_args where possible in test code.
|
||||||
|
* 2. If m_args is not accessible, use m_node.args as a fallback.
|
||||||
|
* 3. Avoid direct references to gArgs in test code.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* @see https://github.com/bitcoin/bitcoin/issues/25055 for additional context.
|
||||||
|
*/
|
||||||
ArgsManager m_args;
|
ArgsManager m_args;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue