diff options
author | Andrew Chow <github@achow101.com> | 2023-02-17 17:20:48 -0500 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2023-02-17 17:28:14 -0500 |
commit | a245429d680eb95cf4c0c78e58e63e3f0f5d979a (patch) | |
tree | c9d8e22620bdf98de5ddaa2b3e41cb49fcfba67f /src/Makefile.test_util.include | |
parent | 9321df4487682b9693691132d9cf3f6b158b4c0a (diff) | |
parent | 4275195606e6f42466d9a8ef766b3035833df4d5 (diff) |
Merge bitcoin/bitcoin#26940: test: create random and coins utils, add amount helper, dedupe add_coin
4275195606e6f42466d9a8ef766b3035833df4d5 De-duplicate add_coin methods to a test util helper (Jon Atack)
9d92c3d7f42c18939a9a6aa1ee185f1c958360a0 Create InsecureRandMoneyAmount() test util helper (Jon Atack)
81f5ade2a324167c03c5ce765a26bd42ed652723 Move random test util code from setup_common to random (Jon Atack)
Pull request description:
- Move random test utilities from `setup_common` to a new `random` file, as many tests don't use this code.
- Create a helper to generate semi-random CAmounts up to `MONEY_RANGE` rather than only uint32, and use the helper in the unit tests.
- De-duplicate a shared `add_coin` method by extracting it to a `coins` test utility.
ACKs for top commit:
pinheadmz:
ACK 4275195606e6f42466d9a8ef766b3035833df4d5
achow101:
ACK 4275195606e6f42466d9a8ef766b3035833df4d5
john-moffett:
ACK 4275195606e6f42466d9a8ef766b3035833df4d5
Tree-SHA512: 3ed974251149c7417f935ef2f8865aa0dcc33b281b47522b0f96f1979dff94bb8527957f098fe4d210f40d715c00f29512f2ffe189097102229023b7284a3a27
Diffstat (limited to 'src/Makefile.test_util.include')
-rw-r--r-- | src/Makefile.test_util.include | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Makefile.test_util.include b/src/Makefile.test_util.include index ae77b79b8b..aefefe789a 100644 --- a/src/Makefile.test_util.include +++ b/src/Makefile.test_util.include @@ -10,10 +10,12 @@ EXTRA_LIBRARIES += \ TEST_UTIL_H = \ test/util/blockfilter.h \ test/util/chainstate.h \ + test/util/coins.h \ test/util/json.h \ test/util/logging.h \ test/util/mining.h \ test/util/net.h \ + test/util/random.h \ test/util/script.h \ test/util/setup_common.h \ test/util/str.h \ @@ -30,6 +32,7 @@ libtest_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS) libtest_util_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) libtest_util_a_SOURCES = \ test/util/blockfilter.cpp \ + test/util/coins.cpp \ test/util/json.cpp \ test/util/logging.cpp \ test/util/mining.cpp \ |