quickcheck

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRandomGenerator

func AddRandomGenerator(generatorFunc func() interface{})

AddRandomGenerator instals

func Boolean

func Boolean() bool

Boolean returns an arbitrary boolean value

func Check

func Check(t *testing.T, name string, propertyFunc interface{})

Check validates a property

func CreateOneOfGenerator

func CreateOneOfGenerator(values ...interface{}) func() interface{}

CreateOneOfGenerator creates a 'one of' random generator

func Int

func Int() int

Int returns an arbitrary non-negative integer value

func OneOf

func OneOf(values ...interface{}) interface{}

func String

func String() string

String returns an arbitrary string value

func StringContainingOnly

func StringContainingOnly(chars []rune) string

StringContainingOnly returns an arbitrary string value containing only the specified characters

Types

type RandomGenerator

type RandomGenerator struct {
	// contains filtered or unexported fields
}

RandomGenerator random generator

func (RandomGenerator) Generate

func (g RandomGenerator) Generate() interface{}

Generate ...

func (RandomGenerator) Type

func (g RandomGenerator) Type() reflect.Type

Type ...

func (RandomGenerator) Value

func (g RandomGenerator) Value() reflect.Value

Value ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL