Documentation
¶
Index ¶
- func Fuzz(t reflect.Type)
- func MarshalBufTooSmall(t reflect.Type) error
- func MarshalBufTooSmallSparse(t reflect.Type, steps int) error
- func MarshalRemTooSmall(t reflect.Type) error
- func MarshalRemTooSmallSparse(t reflect.Type, steps int) error
- func MarshalUnmarshalCheck(t reflect.Type) error
- func UnmarshalBufTooSmall(t reflect.Type) error
- func UnmarshalBufTooSmallSparse(t reflect.Type, steps int) error
- func UnmarshalRemTooSmall(t reflect.Type) error
- func UnmarshalRemTooSmallSparse(t reflect.Type, steps int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fuzz ¶
Fuzz generates a random instance of a type, and then attempts to unmarshal random bytes into that instance. It returns nothing, but is expected to not panic.
func MarshalBufTooSmall ¶
MarshalBufTooSmall generates a random intance of a type, and then attempts to marshal it into a buffer that is too small. It returns an error when marshaling succeeds. Otherwise, it returns nil.
Equivalent to MarshalBufTooSmallSparse(t, 0).
func MarshalBufTooSmallSparse ¶ added in v1.2.7
MarshalBufTooSmallSparse generates a random intance of a type, and then attempts to marshal it into a buffer that is too small. It returns an error when marshaling succeeds. Otherwise, it returns nil.
The number of buffer sizes tested is determinted by the given integer. A value of 0 means that all buffer sizes will be tested.
func MarshalRemTooSmall ¶
MarshalRemTooSmall generates a random intance of a type, and then attempts to marshal when a remaining memory quota that is too small. It returns an error when marshaling succeeds. Otherwise, it returns nil.
Equivalent to MarshalRemTooSmallSparse(t, 0).
func MarshalRemTooSmallSparse ¶ added in v1.2.7
MarshalRemTooSmallSparse generates a random intance of a type, and then attempts to marshal when a remaining memory quota that is too small. It returns an error when marshaling succeeds. Otherwise, it returns nil.
The number of buffer sizes tested is determinted by the given integer. A value of 0 means that all buffer sizes will be tested.
func MarshalUnmarshalCheck ¶
MarshalUnmarshalCheck generates a random instance of a type, marshals it into binary, unmarshals the result into a new instance of the type, and then does a deep equality check on the two instances. An error is returned when generation, marshaling, or unmarshaling return an error, or if the two instances are unequal. Otherwise, it returns nil.
func UnmarshalBufTooSmall ¶
UnmarshalBufTooSmall generates a random intance of a type, marshals it into binary, and then attempts to unmarshal the result with a buffer that is too small. It returns an error when marshaling succeeds. Otherwise, it returns nil.
Equivalent to UnmarshalBufTooSmallSparse(t, 0).
func UnmarshalBufTooSmallSparse ¶ added in v1.2.7
UnmarshalBufTooSmallSparse generates a random intance of a type, marshals it into binary, and then attempts to unmarshal the result with a buffer that is too small. It returns an error when marshaling succeeds. Otherwise, it returns nil.
The number of buffer sizes tested is determinted by the given integer. A value of 0 means that all buffer sizes will be tested.
func UnmarshalRemTooSmall ¶
UnmarshalRemTooSmall generates a random intance of a type, marshals it into binary, and then attempts to unmarshal the result with a remaining memory quota that is too small. It returns an error when marshaling succeeds. Otherwise, it returns nil.
Equivalent to UnmarshalRemTooSmallSparse(t, 0).
func UnmarshalRemTooSmallSparse ¶ added in v1.2.7
UnmarshalRemTooSmallSparse generates a random intance of a type, marshals it into binary, and then attempts to unmarshal the result with a remaining memory quota that is too small. It returns an error when marshaling succeeds. Otherwise, it returns nil.
The number of buffer sizes tested is determinted by the given integer. A value of 0 means that all buffer sizes will be tested.
Types ¶
This section is empty.