View Source Estructura.StreamData (estructura v1.5.0)

Additional generators to be used with __generator__/1 generated by Use Estructura

Summary

Types

An opaque type that represents an Estructura.StreamData generator that generates values of type a.

Functions

Generates an instance of Date.t(). This generator is unshrinkable.

Generates an instance of DateTime.t(). This generator is unshrinkable.

Identity function as a stream data generator

Helper to generate unshrinkable streams as per Stream.iterate/2.

Types

@opaque t(a)

An opaque type that represents an Estructura.StreamData generator that generates values of type a.

Functions

@spec date(keyword()) :: StreamData.t(Date.t())

Generates an instance of Date.t(). This generator is unshrinkable.

@spec datetime(keyword()) :: StreamData.t(DateTime.t())

Generates an instance of DateTime.t(). This generator is unshrinkable.

@spec id(keyword()) :: StreamData.t((term() -> term()))

Identity function as a stream data generator

Link to this function

iterate(initial_value, next_fun)

View Source
@spec iterate(value, (value -> value)) :: StreamData.t(value) when value: term()

Helper to generate unshrinkable streams as per Stream.iterate/2.