testing: (*testing.Benchmark).Log always logs #10713
Closed
Labels
Milestone
Comments
I think this is a documentation issue. The code says:
|
Thanks guys. Great service! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
With this benchmark:
package main
import "testing"
func BenchmarkLog(b *testing.B) {
b.Log("why?")
}
I get this output:
$ go test -bench .
testing: warning: no tests to run
PASS
BenchmarkLog 2000000000 0.00 ns/op
--- BENCH: BenchmarkLog
issue_test.go:6: why?
issue_test.go:6: why?
issue_test.go:6: why?
issue_test.go:6: why?
issue_test.go:6: why?
issue_test.go:6: why?
The docs say, "The text will be printed only if the test fails or the -test.v flag is set."
Why is b.Log logging anyway?
The text was updated successfully, but these errors were encountered: