Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestBenchmarkStartsFrom1 (0.59 sec)

  1. src/testing/sub_test.go

    	// Ensure Benchmark initialized common.w by invoking it with an error and
    	// normal case.
    	Benchmark(func(b *B) { b.Error("do not print this output") })
    	Benchmark(func(b *B) {})
    }
    
    func TestBenchmarkStartsFrom1(t *T) {
    	var first = true
    	Benchmark(func(b *B) {
    		if first && b.N != 1 {
    			panic(fmt.Sprintf("Benchmark() first N=%v; want 1", b.N))
    		}
    		first = false
    	})
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 01 21:27:08 UTC 2023
    - 23.8K bytes
    - Viewed (0)
Back to top