Copyright © 2010-2016 Manolis Papadakis, Eirini Arvaniti and Kostis Sagonas
Version: Jun 20 2016 16:27:12
Authors: Manolis Papadakis.
Generator subsystem and generators for basic types.
You can use these functions to try out the random instance generation and shrinking subsystems.
CAUTION: These functions should never be used inside properties. They are meant for demonstration purposes only.instance() = term()
A value produced by the random instance generator.
seed() = {non_neg_integer(), non_neg_integer(), non_neg_integer()}
size() = non_neg_integer()
pick/1 | Equivalent to pick(Type, 10). |
pick/2 | Equivalent to pick(Type, Size, os:timestamp()). |
pick/3 | Generates a random instance of Type , of size Size with seed Seed . |
sample/1 | Equivalent to sample(Type, 10, 20). |
sample/3 | Generates and prints one random instance of Type for each size from
StartSize up to EndSize . |
sampleshrink/1 | Equivalent to sampleshrink(Type, 10). |
sampleshrink/2 | Generates a random instance of Type , of size Size , then shrinks it
as far as it goes. |
pick(Type :: proper_types:raw_type()) -> {ok, instance()} | error
Equivalent to pick(Type, 10).
pick(Type :: proper_types:raw_type(), Size :: size()) -> {ok, instance()} | error
Equivalent to pick(Type, Size, os:timestamp()).
pick(Type :: proper_types:raw_type(), Size :: size(), Seed :: seed()) -> {ok, instance()} | error
Generates a random instance of Type
, of size Size
with seed Seed
.
sample(Type :: proper_types:raw_type()) -> ok
Equivalent to sample(Type, 10, 20).
sample(Type :: proper_types:raw_type(), StartSize :: size(), EndSize :: size()) -> ok
Generates and prints one random instance of Type
for each size from
StartSize
up to EndSize
.
sampleshrink(Type :: proper_types:raw_type()) -> ok
Equivalent to sampleshrink(Type, 10).
sampleshrink(Type :: proper_types:raw_type(), Size :: size()) -> ok
Generates a random instance of Type
, of size Size
, then shrinks it
as far as it goes. The value produced on each step of the shrinking process
is printed on the screen.
Generated by EDoc, Jun 20 2016, 16:27:12.