Registry / testing / leanovate-gopter

leanovate-gopter

JSON →
library0.2.11gogounverified

Package gopter provides property-based testing for Go, inspired by QuickCheck.

go get github.com/leanovate/gopter
INSTALL
IMPORT
SIG · LEANOVATE-GOPTER
L
leanovate-gopter
testinggov0.2.11
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

gopter
github.com/leanovate/gopter

Defines a property test that checks reversing a string twice returns the original.

package main import ( "testing" "github.com/leanovate/gopter" "github.com/leanovate/gopter/gen" ) func TestProperty(t *testing.T) { properties := gopter.NewProperties(nil) properties.Property("reverse of reverse is original", prop.ForAll( func(s string) bool { return reverse(reverse(s)) == s }, gen.AnyString(), )) properties.TestingRun(t) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.2.11latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
leanovate-gopter — go get leanovate-gopter · libregistry