std.unittest.prop_test

Function Description

unittest.prop_test provides the unit test framework with the types and methods required for parameterized tests.

API List

Function

NameDescription
emptyIterable<T>()Creates an empty iterator.
random<T>()Generates random data of the T type. T must implement the Arbitrary<T> interface. The return value of this function is a parameter source for parameterized tests.

Interface

NameDescription
ArbitraryGenerates random values of the T type.
IndexAccessServes as the utility interface for accessing tuple elements through indexes.
RandomSourceProvides the capability of randomly generating basic data required by Arbitrary.
ShrinkReduces a T-type value to multiple smaller values.

Class

NameDescription
GeneratorsProvides auxiliary functions for helping developers compile their own generators.
LazySeqSpecifies the sequence of T-type values for delay calculation. It is used to calculate and memorize values during iteration.
ShrinkHelpersProvides a method for implementing the reduce iterator for tuples.

Struct

NameDescription
Function0WrapperWraps a closure into a struct.
TupleWrapper2Wraps a closure into a struct. The closure contains two parameters.
TupleWrapper3Wraps a closure into a struct. The closure contains three parameters.
TupleWrapper4Wraps a closure into a struct. The closure contains four parameters.
TupleWrapper5Wraps a closure into a struct. The closure contains five parameters.