Standard library / testing
testing.B.Failed()
Report whether failure has been recorded so far. A false result does not guarantee subsequent success. Expected process exit: 0; output contains ['PASS', 'failed false']. Run as a _test.go file using the Go test harness.
Formal Syntax & Structure
go syntaxgo
func (c *B) Failed() boolReturn Value
bool
Result of the operation described above.
Working Example
Example Snippetgo
package main
import ( "fmt" "testing")
func BenchmarkReference(b *testing.B) { fmt.Println("failed", b.Failed()) }