mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-22 00:00:55 +01:00
fa494a1d53refactor: Specify const in std::span constructor, where needed (MarcoFalke)faaf4800aaAllow std::span in stream serialization (MarcoFalke)faa5391f77refactor: test: Return std::span from StringBytes (MarcoFalke)fa86223475refactor: Avoid passing span iterators when data pointers are expected (MarcoFalke)faae6fa5f6refactor: Simplify SpanPopBack (MarcoFalke)facc4f120brefactor: Replace fwd-decl with proper include (MarcoFalke)fac3a782earefactor: Avoid needless, unsafe c-style cast (MarcoFalke) Pull request description: The `std::span` type is already used in some parts of the codebase, and in most contexts can implicitly convert to and from `Span`. However, the two types are not identical in behavior and trying to use one over the other can result in compile failures in some contexts. Fix all those issues by allowing either `Span` or `std::span` in any part of the codebase. All of the changes are also required for the scripted-diff to replace `Span` with `std::span` in https://github.com/bitcoin/bitcoin/pull/31519 ACKs for top commit: sipa: utACKfa494a1d53fjahr: Code review ACKfa494a1d53achow101: ACKfa494a1d53theuni: utACKfa494a1d53. adamandrews1: utACKfa494a1d53Tree-SHA512: 9440941823e884ff5d7ac161f58b9a0704d8e803b4c91c400bdb5f58f898e4637d63ae627cfc7330e98a721fc38285a04641175aa18d991bd35f8b69ed1d74c4
Test library
This contains files for the test library, which is used by the test binaries (unit tests, benchmarks, fuzzers, gui tests).
Generally, the files in this folder should be well-separated modules. New code should be added to existing modules or (when in doubt) a new module should be created.
The utilities in here are compiled into a library, which does not hold any state. However, the main file setup_common
defines the common test setup for all test binaries. The test binaries will handle the global state when they
instantiate the BasicTestingSetup (or one of its derived classes).