github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/test_benchmark_fatal.txt (about)

     1  # Test that calling t.Fatal in a benchmark causes a non-zero exit status.
     2  
     3  ! go test -run '^$' -bench . benchfatal
     4  ! stdout ^ok
     5  ! stderr ^ok
     6  stdout FAIL.*benchfatal
     7  
     8  -- benchfatal/x_test.go --
     9  package benchfatal
    10  
    11  import "testing"
    12  
    13  func BenchmarkThatCallsFatal(b *testing.B) {
    14  	b.Fatal("called by benchmark")
    15  }