MCPcopy Create free account
hub / github.com/ElementsProject/elements / CallOneOf

Function CallOneOf

src/test/fuzz/util.h:82–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80
81template <typename... Callables>
82size_t CallOneOf(FuzzedDataProvider& fuzzed_data_provider, Callables... callables)
83{
84 constexpr size_t call_size{sizeof...(callables)};
85 static_assert(call_size >= 1);
86 const size_t call_index{fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, call_size - 1)};
87
88 size_t i{0};
89 ((i++ == call_index ? callables() : void()), ...);
90 return call_size;
91}
92
93template <typename Collection>
94auto& PickValue(FuzzedDataProvider& fuzzed_data_provider, Collection& col)

Callers 15

FUZZ_TARGET_INITFunction · 0.85
FUZZ_TARGETFunction · 0.85
FUZZ_TARGETFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
FUZZ_TARGETFunction · 0.85
FUZZ_TARGETFunction · 0.85
FUZZ_TARGETFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
FUZZ_TARGETFunction · 0.85
FUZZ_TARGETFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected