iteration: add benchmark test
This commit is contained in:
parent
917ce1638f
commit
de5d9f39b6
@ -10,3 +10,9 @@ func TestRepeat(t *testing.T) {
|
|||||||
t.Errorf("expected %q but got %q", expected, repeated)
|
t.Errorf("expected %q but got %q", expected, repeated)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func BenchmarkRepeat(b *testing.B) {
|
||||||
|
for i := 0; i < b.N; i++ {
|
||||||
|
Repeat("a")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user