Skip to content

Commit 1fe1b3b

Browse files
committed
doc: doxygen comment for m_args usage in tests
Closes: bitcoin#25055 Add doxygen comment to the m_args member in the unit test framework, clarifying its purpose.
1 parent 48cf3da commit 1fe1b3b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/test/util/setup_common.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,23 @@ struct BasicTestingSetup {
7575
fs::path m_path_root;
7676
fs::path m_path_lock;
7777
bool m_has_custom_datadir{false};
78+
/** @brief Test-specific arguments and settings.
79+
*
80+
* This member is intended to be the primary source of settings for code
81+
* being tested by unit tests. It exists to make tests more self-contained
82+
* and reduce reliance on global state.
83+
*
84+
* Usage guidelines:
85+
* 1. Prefer using m_args where possible in test code.
86+
* 2. If m_args is not accessible, use m_node.args as a fallback.
87+
* 3. Avoid direct references to gArgs in test code.
88+
*
89+
* Note: Currently, m_node.args points to gArgs for backwards
90+
* compatibility. In the future, it will point to m_args to further isolate
91+
* test environments.
92+
*
93+
* @see https://github.com/bitcoin/bitcoin/issues/25055 for additional context.
94+
*/
7895
ArgsManager m_args;
7996
};
8097

0 commit comments

Comments
 (0)