5 #ifndef BITCOIN_TEST_FUZZ_FUZZ_H
6 #define BITCOIN_TEST_FUZZ_FUZZ_H
12 #include <string_view>
23 #define LIMITED_WHILE(condition, limit) \
24 for (unsigned _count{limit}; (condition) && _count; --_count)
30 std::function<void()>
init{[] {}};
36 #define FUZZ_TARGET(...) DETAIL_FUZZ(__VA_ARGS__)
38 #define DETAIL_FUZZ(name, ...) \
39 void name##_fuzz_target(FuzzBufferType); \
40 struct name##_Before_Main { \
41 name##_Before_Main() \
43 FuzzFrameworkRegisterTarget(#name, name##_fuzz_target, {__VA_ARGS__}); \
45 } const static g_##name##_before_main; \
46 void name##_fuzz_target(FuzzBufferType buffer)
A Span is an object that can refer to a contiguous sequence of objects.
std::function< void(FuzzBufferType)> TypeTestOneInput
void FuzzFrameworkRegisterTarget(std::string_view name, TypeTestOneInput target, FuzzTargetOptions opts)