github.com/leanovate/gopter@v0.2.9/prop/error.go (about) 1 package prop 2 3 import "github.com/leanovate/gopter" 4 5 // ErrorProp creates a property that will always fail with an error. 6 // Mostly used as a fallback when setup/initialization fails 7 func ErrorProp(err error) gopter.Prop { 8 return func(genParams *gopter.GenParameters) *gopter.PropResult { 9 return &gopter.PropResult{ 10 Status: gopter.PropError, 11 Error: err, 12 } 13 } 14 }