BDE 4.14.0 Production release
|
#include <bslim_fuzzutil.h>
Static Public Member Functions | |
static bool | consumeBool (FuzzDataView *fuzzDataView) |
template<class TYPE > | |
static bsl::enable_if< bsl::is_integral< TYPE >::value, TYPE >::type | consumeNumber (FuzzDataView *fuzzDataView) |
template<class TYPE > | |
static bsl::enable_if< bsl::is_floating_point< TYPE >::value, TYPE >::type | consumeNumber (FuzzDataView *fuzzDataView) |
template<class TYPE > | |
static bsl::enable_if< bsl::is_integral< TYPE >::value, TYPE >::type | consumeNumberInRange (FuzzDataView *fuzzDataView, TYPE min, TYPE max) |
template<class TYPE > | |
static bsl::enable_if< bsl::is_floating_point< TYPE >::value, TYPE >::type | consumeNumberInRange (FuzzDataView *fuzzDataView, TYPE min, TYPE max) |
static void | consumeRandomLengthChars (bsl::vector< char > *output, FuzzDataView *fuzzDataView, bsl::size_t maxLength) |
static void | consumeRandomLengthChars (std::vector< char > *output, FuzzDataView *fuzzDataView, bsl::size_t maxLength) |
static void | consumeRandomLengthString (bsl::string *output, FuzzDataView *fuzzDataView, bsl::size_t maxLength) |
static void | consumeRandomLengthString (std::string *output, FuzzDataView *fuzzDataView, bsl::size_t maxLength) |
This utility struct
provides a namespace for a suite of functions operating on objects of type FuzzDataView
and providing the consumption of fuzz data bytes into fundamental and standard library types.
|
inlinestatic |
Return a bool
value based upon consuming a single byte from the specified fuzzDataView
. If fuzzDataView->length()
is 0, return false
.
|
static |
|
static |
Return a value of (template parameter) TYPE
in the range [min .. max] – where min
and max
are the minimum and maximum values representable by the TYPE
– based on at most the next sizeof(TYPE) + 1
bytes from the specified fuzzDataView
, and update fuzzDataView
to reflect the bytes consumed. If 0 == fuzzDataView->length()
, return the minimum value of TYPE
. This function does not participate in overload resolution unless either bsl::is_integral<TYPE>::value
or bsl::is_floating_point<TYPE>::value
is true
. The behavior is undefined if bsl::is_same<TYPE, bool>::value
or bsl::is_same<TYPE, long double>
is true
.
|
static |
Return a value of (template parameter) TYPE
in the specified range [min .. max] based on at most the next sizeof(TYPE) + 1
bytes from the specified fuzzDataView
, and update fuzzDataView
to reflect the bytes consumed. If 0 == fuzzDataView->length()
, return the specified min
. This function does not participate in overload resolution unless either bsl::is_integral<TYPE>::value
or bsl::is_floating_point<TYPE>::value
is true
. The behavior is undefined if min > max
, min
or max
is not finite, or either bsl::is_same<TYPE, bool>::value
or bsl::is_same<TYPE, long double>
is true
.
|
static |
|
static |
|
static |
|
static |
|
static |