Skip to content

a3d21/pter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pter

Go Property Tester base on testing/quick.

usage

$ go get github.com/a3d21/pter

example

goto example_test.go.

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, &Config{
		MaxCount: 10000,
	})
}

About

Go Property TesTer base on testing/quick.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages