qcgen

package module
v0.0.0-...-0b059e7 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

README

qcgen

helpers for building go quick check generators from custom functions

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenBool

func GenBool(rng *rand.Rand) bool

func GenUint64

func GenUint64(rng *rand.Rand) uint64

func GenUint64Range

func GenUint64Range(rng *rand.Rand, min, max uint64) uint64

func GenUintRange

func GenUintRange(rng *rand.Rand, min, max uint) uint

func MakeGenUint64Range

func MakeGenUint64Range(min, max uint64) func(rng *rand.Rand) uint64

func MakeGenUintRange

func MakeGenUintRange(min, max uint) func(rng *rand.Rand) uint

Types

type Generator

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

func NewGenerator

func NewGenerator(testFn interface{}, fns ...interface{}) *Generator

NewGenerator creates a new generator. Each function must implement `func(*rand.Rand) T`, with T being the custom type to be generated. The generators Gen methods selects the function to execute on matching return type.

func (*Generator) Gen

func (g *Generator) Gen(args []reflect.Value, rng *rand.Rand)

Jump to

Keyboard shortcuts

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