pter

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: MIT Imports: 5 Imported by: 0

README

pter

Go Property Tester base on testing/quick.

usage

$ go get github.com/a3d21/pter

example"

func TestAddSpec(t *testing.T) {
	add := func(a, b int) int {
		return a + b
	}

	assertion := func(a, b int) bool {
		return add(a, b) == a+b
	}

	QuickCheck(t, assertion, 2000)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FuzzArgs

func FuzzArgs(fuzzer *fuzz.Fuzzer, assertion interface{}) func(args []reflect.Value, rand *rand.Rand)

FuzzArgs fuzz non-nil args generator for testing/quick

func QuickCheck

func QuickCheck(t *testing.T, assertion interface{}, maxCount int)

func QuickCheckWithFuzzer

func QuickCheckWithFuzzer(t *testing.T, fuzzer *fuzz.Fuzzer, assertion interface{}, maxCount int)

Types

This section is empty.

Jump to

Keyboard shortcuts

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