5 #ifndef BITCOIN_TEST_FUZZ_FUZZ_H 6 #define BITCOIN_TEST_FUZZ_FUZZ_H 11 #include <string_view> 22 #define LIMITED_WHILE(condition, limit) \ 23 for (unsigned _count{limit}; (condition) && _count; --_count) 29 std::function<void()>
init{[] {}};
35 #define FUZZ_TARGET(...) DETAIL_FUZZ(__VA_ARGS__) 37 #define DETAIL_FUZZ(name, ...) \ 38 void name##_fuzz_target(FuzzBufferType); \ 39 struct name##_Before_Main { \ 40 name##_Before_Main() \ 42 FuzzFrameworkRegisterTarget(#name, name##_fuzz_target, {__VA_ARGS__}); \ 44 } const static g_##name##_before_main; \ 45 void name##_fuzz_target(FuzzBufferType buffer) 47 #endif // BITCOIN_TEST_FUZZ_FUZZ_H std::function< void(FuzzBufferType)> TypeTestOneInput
std::span< const uint8_t > FuzzBufferType
void FuzzFrameworkRegisterTarget(std::string_view name, TypeTestOneInput target, FuzzTargetOptions opts)