transmission/tests/libtransmission
Charles Kerr 8a35aa0903
refactor: add tr_rand_obj() (#4238)
* refactor: add tr_rand_obj()

There are a lot of places in the codebase where we need to populate
an integral type or a fixed-size array with random data. To do this,
we instantiate a local on the stack, fill it with tr_rand_buffer(),
and then use it.

This PR creates a helper function to make this a one-liner.
2022-11-25 15:04:37 -06:00
..
assets test: add platform tests (#3514) 2022-07-22 20:10:02 -05:00
.clang-tidy refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
CMakeLists.txt Remove Xcode project in favor of CMake (#4147) 2022-11-12 20:01:57 +00:00
announce-list-test.cc fix: coverity warnings (#3632) 2022-08-13 12:11:07 -05:00
announcer-test.cc
announcer-udp-test.cc refactor: add tr_rand_obj() (#4238) 2022-11-25 15:04:37 -06:00
benc-test.cc
bitfield-test.cc fix: new sonarcloud, coverity, gcc warnings (#4229) 2022-11-23 13:47:04 -06:00
block-info-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
blocklist-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
buffer-test.cc refactor: extract `tr_buffer` class from `tr_peerIo` (#3986) 2022-10-19 11:42:08 -05:00
clients-test.cc refactor: add tr_rand_obj() (#4238) 2022-11-25 15:04:37 -06:00
completion-test.cc refactor: add tr_rand_obj() (#4238) 2022-11-25 15:04:37 -06:00
copy-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
crypto-test-ref.h refactor: add tr_rand_obj() (#4238) 2022-11-25 15:04:37 -06:00
crypto-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
dht-test.cc refactor: add tr_rand_obj() (#4238) 2022-11-25 15:04:37 -06:00
dns-test.cc perf: revert e065565cd to restore async dns lookups (#4182) 2022-11-15 11:16:49 -06:00
error-test.cc
file-piece-map-test.cc
file-test.cc fix: coverity warnings, sonarcloud code smells (#4232) 2022-11-24 10:17:02 -06:00
getopt-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
handshake-test.cc refactor: add tr_rand_obj() (#4238) 2022-11-25 15:04:37 -06:00
history-test.cc
json-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
lpd-test.cc refactor: add tr_rand_obj() (#4238) 2022-11-25 15:04:37 -06:00
magnet-metainfo-test.cc refactor: add tr_rand_obj() (#4238) 2022-11-25 15:04:37 -06:00
makemeta-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
move-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
net-test.cc fix: ftbfs on Windows (#4204) 2022-11-16 18:03:48 -06:00
open-files-test.cc
peer-mgr-active-requests-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
peer-mgr-wishlist-test.cc
peer-msgs-test.cc Remove tr_generateAllowedSet declaration (#4029) 2022-10-25 08:50:53 -05:00
platform-test.cc refactor: remove TR_PRIsv macros (#3842) 2022-09-23 14:36:37 -05:00
quark-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
remove-test.cc
rename-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
rpc-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
session-alt-speeds-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
session-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
settings-test.cc fix: ftbfs on Windows (#4204) 2022-11-16 18:03:48 -06:00
strbuf-test.cc chore: iwyu headers (#3661) 2022-08-17 11:08:36 -05:00
subprocess-test-program.cc
subprocess-test-script.cmd
subprocess-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
test-fixtures.h refactor: add tr_rand_obj() (#4238) 2022-11-25 15:04:37 -06:00
timer-test.cc test: increase timer interval in TimerTest.repeatingThenSingleShot (#4173) 2022-11-14 18:04:15 -06:00
torrent-files-test.cc
torrent-magnet-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
torrent-metainfo-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
torrents-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
utils-test.cc refactor: remove tr_removeElementFromArray() (#3731) 2022-08-28 21:51:26 -05:00
variant-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
watchdir-test.cc refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
web-utils-test.cc refactor: add [[nodiscard]] (#3793) 2022-09-08 21:49:51 -05:00