Debian Codegraph @

src/cmd/go/testdata/script/test_benchmark_fatal.txt

raw
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 -- go.mod --
9 module benchfatal
10
11 go 1.16
12 -- x_test.go --
13 package benchfatal
14
15 import "testing"
16
17 func BenchmarkThatCallsFatal(b *testing.B) {
18 b.Fatal("called by benchmark")
19 }