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

Method PickValueInArray

src/test/fuzz/FuzzedDataProvider.h:303–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301// Returns a copy of the value selected from the given fixed-size |array|.
302template <typename T, size_t size>
303T FuzzedDataProvider::PickValueInArray(const T (&array)[size]) {
304 static_assert(size > 0, "The array must be non empty.");
305 return array[ConsumeIntegralInRange<size_t>(0, size - 1)];
306}
307
308template <typename T, size_t size>
309T FuzzedDataProvider::PickValueInArray(const std::array<T, size> &array) {

Callers 15

GetScriptPubKeyMethod · 0.80
FUZZ_TARGETFunction · 0.80
FUZZ_TARGET_INITFunction · 0.80
FUZZ_TARGETFunction · 0.80
FUZZ_TARGET_INITFunction · 0.80
FUZZ_TARGETFunction · 0.80
FUZZ_TARGET_INITFunction · 0.80
FUZZ_TARGETFunction · 0.80
ConsumeSequenceFunction · 0.80
ConsumeNetAddrFunction · 0.80
FUZZ_TARGETFunction · 0.80
FUZZ_TARGETFunction · 0.80

Calls 2

sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected