Standard library / testing
testing.T.Failed()
Report whether this test has recorded failure so far. Expected stdout: 'false\nPASS\n'. Run as a _test.go file using the Go test harness.
Formal Syntax & Structure
go syntaxgo
func (c *T) Failed() boolReturn Value
bool
Result of the operation described above.
Working Example
Example Snippetgo
package main
import ( "fmt" "testing")
func TestReference(t *testing.T) { fmt.Println(t.Failed()) }