diff options
author | fanquake <fanquake@gmail.com> | 2023-07-17 13:18:27 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-07-17 13:36:53 +0100 |
commit | bf03fed2c70dbb9e526ce2e423b4c1dcb32e0e58 (patch) | |
tree | 6e39f637379ade3ba39a10b88173cf1275565c50 /src/test/fuzz/script_assets_test_minimizer.cpp | |
parent | 275b3e47ccb5c58a969f562e1f51c575d4513a27 (diff) | |
parent | fa6dfaaf45bde465969fa7d8fa6b6574a497a6ca (diff) |
Merge bitcoin/bitcoin#28065: fuzz: Flatten all FUZZ_TARGET macros into one
fa6dfaaf45bde465969fa7d8fa6b6574a497a6ca scripted-diff: Use new FUZZ_TARGET macro everywhere (MarcoFalke)
fa36ad8b091c70190491280dcf0794e94e34a9ed fuzz: Accept options in FUZZ_TARGET macro (MarcoFalke)
Pull request description:
The `FUZZ_TARGET` macros have many issues:
* The developer will have to pick the right macro to pass the wanted option.
* Adding a new option requires doubling the number of existing macros in the worst case.
Fix all issues by using only a single macro.
This refactor does not change behavior.
ACKs for top commit:
dergoegge:
ACK fa6dfaaf45bde465969fa7d8fa6b6574a497a6ca
Tree-SHA512: 49a34553867a1734ce89e616b2d7c29b784a67cd8990db6573f0c7b18957636ef0c81d3d0d444a04c12cdc98bc4c4aa7a2ec94e6232dc363620a746e28416444
Diffstat (limited to 'src/test/fuzz/script_assets_test_minimizer.cpp')
-rw-r--r-- | src/test/fuzz/script_assets_test_minimizer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/fuzz/script_assets_test_minimizer.cpp b/src/test/fuzz/script_assets_test_minimizer.cpp index 206d219afe..7862be2f21 100644 --- a/src/test/fuzz/script_assets_test_minimizer.cpp +++ b/src/test/fuzz/script_assets_test_minimizer.cpp @@ -186,7 +186,7 @@ void Test(const std::string& str) void test_init() {} -FUZZ_TARGET_INIT_HIDDEN(script_assets_test_minimizer, test_init, /*hidden=*/true) +FUZZ_TARGET(script_assets_test_minimizer, .init = test_init, .hidden = true) { if (buffer.size() < 2 || buffer.back() != '\n' || buffer[buffer.size() - 2] != ',') return; const std::string str((const char*)buffer.data(), buffer.size() - 2); |