0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-24 12:41:41 -05:00
bitcoin-bitcoin-core/src/test/util
merge-script 6852d1d487
Merge bitcoin/bitcoin#30796: test: Use std::span and std::string_view for raw data
faecca9a85 test: Use span for raw data (MarcoFalke)
fac973647d test: Use string_view for json_tests (MarcoFalke)

Pull request description:

  The build system converts raw data into a C++ header file for tests.

  This change modernizes the code to use the convenience wrappers `std::span` and `std::string_view`, so that redundant copies can be avoided.

ACKs for top commit:
  fjahr:
    re-ACK faecca9a85
  TheCharlatan:
    ACK faecca9a85
  stickies-v:
    ACK faecca9a85
  hebasto:
    ACK faecca9a85, I have reviewed the code and the generated headers.

Tree-SHA512: 1f4951c54aff11ba27c41fb70f2821bdb79e06ca0abae734b970bd0d64dda9d8cced824a891fd51b3e9d4e5715ee9eb49ed5d369010a45eca7c3bec9f8641235
2024-09-05 13:46:22 +01:00
..
blockfilter.cpp Remove unused includes from blockfilter.h 2023-08-17 18:28:15 +02:00
blockfilter.h refactor: Move functions to BlockManager methods 2023-05-10 19:06:53 +02:00
chainstate.h scripted-diff: Modernize naming of nChainTx and nTxCount 2024-08-04 14:24:43 +02:00
cluster_linearize.h doc: fix a few simple codespell warnings 2024-08-28 18:42:10 +02:00
CMakeLists.txt cmake: Add wallet functionality 2024-08-16 19:27:40 +01:00
coins.cpp test: refactor: Accept any RandomNumberGenerator in RandMoney 2024-08-26 11:19:43 +02:00
coins.h test: refactor: Pass rng parameters to test functions 2024-08-26 11:19:16 +02:00
index.cpp refactor: Remove call to ShutdownRequested from IndexWaitSynced 2023-12-04 15:39:15 -04:00
index.h refactor: Remove call to ShutdownRequested from IndexWaitSynced 2023-12-04 15:39:15 -04:00
json.cpp test: Use string_view for json_tests 2024-09-03 16:06:20 +02:00
json.h test: Use string_view for json_tests 2024-09-03 16:06:20 +02:00
logging.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
logging.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
mining.cpp refactor: De-globalize g_signals 2024-02-15 14:37:01 +01:00
mining.h test: Add util to mine invalid blocks 2023-05-02 17:17:06 +02:00
net.cpp Merge bitcoin/bitcoin#30394: net: fix race condition in self-connect detection 2024-07-16 09:40:53 +01:00
net.h [fuzz] Harness for version handshake 2024-07-31 13:25:52 +01:00
poolresourcetester.h Add pool based memory resource & allocator 2023-03-23 19:38:38 +01:00
random.cpp Merge bitcoin/bitcoin#30571: test: [refactor] Use m_rng directly 2024-08-28 16:56:32 +01:00
random.h test: Remove FastRandomContext global 2024-08-26 11:22:20 +02:00
README.md
script.cpp fuzz: [refactor] Use IsValidFlagCombination in signature_checker fuzz target 2021-03-30 10:42:45 +02:00
script.h fuzz: allow reaching MempoolAcceptResult::ResultType::DIFFERENT_WITNESS in tx_package_eval target 2023-11-09 09:07:03 -05:00
setup_common.cpp refactor: Hand-replace some ParseHex -> ""_hex 2024-08-28 19:11:59 +02:00
setup_common.h test: Remove FastRandomContext global 2024-08-26 11:22:20 +02:00
str.cpp
str.h
transaction_utils.cpp test: add BulkTransaction helper to unit test transaction utils 2024-09-03 22:20:01 +02:00
transaction_utils.h test: add BulkTransaction helper to unit test transaction utils 2024-09-03 22:20:01 +02:00
txmempool.cpp scripted-diff: change names from V3 to TRUC 2024-07-02 12:06:07 +01:00
txmempool.h scripted-diff: change names from V3 to TRUC 2024-07-02 12:06:07 +01:00
validation.cpp validation: pass ChainstateRole for validationinterface calls 2023-09-30 06:38:47 -04:00
validation.h validation: pass ChainstateRole for validationinterface calls 2023-09-30 06:38:47 -04:00

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).