Standard library / testing/quick
testing/quick.CheckError.Error()
Format a property-test counterexample for diagnostics; avoid relying on exact text for control flow. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func (s *CheckError) Error() stringReturn Value
string
Result of the operation described above.
Working Example
Example Snippetgo
package main
import ( "fmt" "strings" "testing/quick")
func main() { e := &quick.CheckError{Count: 1, In: []any{7}} fmt.Println(strings.Contains(e.Error(), "7"))}