diff options
author | willcl-ark <will@256k1.dev> | 2024-10-13 08:59:33 +0100 |
---|---|---|
committer | willcl-ark <will@256k1.dev> | 2024-10-13 09:05:21 +0100 |
commit | 1fe1b3ba8e9e73987a12fbd9eab7a29459d9f14c (patch) | |
tree | f29e8c2fefaf7459def84e5f7f7318b2bafd7285 | |
parent | 48cf3da636089873ba7280e0d5b22eb81811d194 (diff) |
doc: doxygen comment for m_args usage in tests
Closes: #25055
Add doxygen comment to the m_args member in the unit test framework,
clarifying its purpose.
-rw-r--r-- | src/test/util/setup_common.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/util/setup_common.h b/src/test/util/setup_common.h index f5a3c0dcee..f9cf5d9157 100644 --- a/src/test/util/setup_common.h +++ b/src/test/util/setup_common.h @@ -75,6 +75,23 @@ struct BasicTestingSetup { fs::path m_path_root; fs::path m_path_lock; 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; }; |