aboutsummaryrefslogtreecommitdiff
path: root/src/testing/benchmark_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/benchmark_test.go')
-rw-r--r--src/testing/benchmark_test.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/testing/benchmark_test.go b/src/testing/benchmark_test.go
index 239e730021..a195e4c576 100644
--- a/src/testing/benchmark_test.go
+++ b/src/testing/benchmark_test.go
@@ -127,28 +127,6 @@ func TestRunParallelSkipNow(t *testing.T) {
})
}
-func TestBLoopHasResults(t *testing.T) {
- // Verify that b.N and the b.Loop() iteration count match.
- var nIterated int
- bRet := testing.Benchmark(func(b *testing.B) {
- i := 0
- for b.Loop() {
- i++
- }
- nIterated = i
- })
- if nIterated == 0 {
- t.Fatalf("Iteration count zero")
- }
- if bRet.N != nIterated {
- t.Fatalf("Benchmark result N incorrect, got %d want %d", bRet.N, nIterated)
- }
- // We only need to check duration to make sure benchmark result is written.
- if bRet.T == 0 {
- t.Fatalf("Benchmark result duration unset")
- }
-}
-
func ExampleB_RunParallel() {
// Parallel benchmark for text/template.Template.Execute on a single object.
testing.Benchmark(func(b *testing.B) {