Skip to content

Commit

Permalink
add test for bench
Browse files Browse the repository at this point in the history
  • Loading branch information
philchia committed Dec 2, 2016
1 parent 6adf1af commit 1681a14
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions bench/bench_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package bench

import (
"testing"
)

func TestBenchmark(t *testing.T) {
type args struct {
b *testing.B
f func()
}
tests := []struct {
name string
args args
}{
{
"case1",
args{
&testing.B{N: 100},
func() {},
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Benchmark(tt.args.b, tt.args.f)
})
}
}

0 comments on commit 1681a14

Please sign in to comment.