aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/fuzz.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-02-08 10:13:08 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-02-08 10:11:59 +0100
commitfafca47adc2476f19f7926de4d55b64b0286e41c (patch)
tree3cd89d3ed01fe00e994aaf15a92762a3f914d59d /src/test/fuzz/fuzz.h
parente51f6c4dee3d42b2707c31fa1c93a337b6bf5ba7 (diff)
downloadbitcoin-fafca47adc2476f19f7926de4d55b64b0286e41c.tar.xz
fuzz: Hide script_assets_test_minimizer
Can be reviewed with --ignore-all-space
Diffstat (limited to 'src/test/fuzz/fuzz.h')
-rw-r--r--src/test/fuzz/fuzz.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/test/fuzz/fuzz.h b/src/test/fuzz/fuzz.h
index 19386a5059..4abc52c15a 100644
--- a/src/test/fuzz/fuzz.h
+++ b/src/test/fuzz/fuzz.h
@@ -15,22 +15,26 @@ using FuzzBufferType = Span<const uint8_t>;
using TypeTestOneInput = std::function<void(FuzzBufferType)>;
using TypeInitialize = std::function<void()>;
+using TypeHidden = bool;
-void FuzzFrameworkRegisterTarget(std::string_view name, TypeTestOneInput target, TypeInitialize init);
+void FuzzFrameworkRegisterTarget(std::string_view name, TypeTestOneInput target, TypeInitialize init, TypeHidden hidden);
-inline void FuzzFrameworkEmptyFun() {}
+inline void FuzzFrameworkEmptyInitFun() {}
#define FUZZ_TARGET(name) \
- FUZZ_TARGET_INIT(name, FuzzFrameworkEmptyFun)
-
-#define FUZZ_TARGET_INIT(name, init_fun) \
- void name##_fuzz_target(FuzzBufferType); \
- struct name##_Before_Main { \
- name##_Before_Main() \
- { \
- FuzzFrameworkRegisterTarget(#name, name##_fuzz_target, init_fun); \
- } \
- } const static g_##name##_before_main; \
+ FUZZ_TARGET_INIT(name, FuzzFrameworkEmptyInitFun)
+
+#define FUZZ_TARGET_INIT(name, init_fun) \
+ FUZZ_TARGET_INIT_HIDDEN(name, init_fun, false)
+
+#define FUZZ_TARGET_INIT_HIDDEN(name, init_fun, hidden) \
+ void name##_fuzz_target(FuzzBufferType); \
+ struct name##_Before_Main { \
+ name##_Before_Main() \
+ { \
+ FuzzFrameworkRegisterTarget(#name, name##_fuzz_target, init_fun, hidden); \
+ } \
+ } const static g_##name##_before_main; \
void name##_fuzz_target(FuzzBufferType buffer)
#endif // BITCOIN_TEST_FUZZ_FUZZ_H