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

Function ConsumeWeakEnum

src/test/fuzz/util.h:157–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155
156template <typename WeakEnumType, size_t size>
157[[nodiscard]] WeakEnumType ConsumeWeakEnum(FuzzedDataProvider& fuzzed_data_provider, const WeakEnumType (&all_types)[size]) noexcept
158{
159 return fuzzed_data_provider.ConsumeBool() ?
160 fuzzed_data_provider.PickValueInArray<WeakEnumType>(all_types) :
161 WeakEnumType(fuzzed_data_provider.ConsumeIntegral<typename std::underlying_type<WeakEnumType>::type>());
162}
163
164[[nodiscard]] inline opcodetype ConsumeOpcodeType(FuzzedDataProvider& fuzzed_data_provider) noexcept
165{

Callers 6

FUZZ_TARGET_INITFunction · 0.85
FillNodeFunction · 0.85
ConsumeAddressFunction · 0.85
ConsumeNodeFunction · 0.85
FUZZ_TARGETFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85

Calls 1

ConsumeBoolMethod · 0.80

Tested by

no test coverage detected