github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/test_benchmark_labels.txt (about) 1 # Tests that go test -bench prints out goos, goarch, and pkg. 2 3 # Check for goos, goarch, and pkg. 4 go test -run ^$ -bench . bench 5 stdout '^goos: '$GOOS 6 stdout '^goarch: '$GOARCH 7 stdout '^pkg: bench' 8 9 # Check go test does not print pkg multiple times 10 ! stdout 'pkg:.*pkg: ' 11 ! stderr 'pkg:.*pkg:' 12 13 -- bench/x_test.go -- 14 package bench 15 16 import "testing" 17 18 func Benchmark(b *testing.B) { 19 }