Skip to content

Commit 7c758b0

Browse files
13rac1aykevl
authored andcommitted
testing: Add Benchmark B struct stub
This struct allows test files containing basic benchmarks to compile and run, but will not run the benchmarks themselves. For #491
1 parent 4ea5974 commit 7c758b0

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/testing/benchmark.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package testing
2+
3+
// B is a type passed to Benchmark functions to manage benchmark timing and to
4+
// specify the number of iterations to run.
5+
//
6+
// TODO: Implement benchmarks. This struct allows test files containing
7+
// benchmarks to compile and run, but will not run the benchmarks themselves.
8+
type B struct {
9+
N int
10+
}

tests/tinygotest/main_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ func TestFail2(t *testing.T) {
1414

1515
func TestPass(t *testing.T) {
1616
}
17+
18+
func BenchmarkNotImplemented(b *testing.B) {
19+
}

0 commit comments

Comments
 (0)