Module suppositions::data [] [src]

This module contains the underlying data generation and shrinking mechanism. The main type is the InfoPool, which represents a pool of random bytes that can be observed via the InfoTap object (obtained via InfoPool#tap).

Also manages the shrinking process (see minimize).

Structs

InfoPool

A pool of data that we can draw upon to generate other types of data.

InfoReplay

A handle to an info Pool that we can draw replayed bytes from, and zero after.

InfoTap

A handle to an info Pool that we can draw newly generated bytes from.

Enums

DataError

The reasons why drawing data from a pool can fail.

Functions

minimize

Try to find the smallest pool p such that the predicate pred returns true. Given that our generators tend to generate smaller outputs from smaller inputs, by minimizing the source pool we can find the smallest value that provokes a failure.