aboutsummaryrefslogtreecommitdiff
path: root/src/strings/strings_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/strings/strings_test.go')
-rw-r--r--src/strings/strings_test.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/strings/strings_test.go b/src/strings/strings_test.go
index bb46e136f2..d6197ed895 100644
--- a/src/strings/strings_test.go
+++ b/src/strings/strings_test.go
@@ -1660,8 +1660,15 @@ func BenchmarkSplitNMultiByteSeparator(b *testing.B) {
}
func BenchmarkRepeat(b *testing.B) {
- for i := 0; i < b.N; i++ {
- Repeat("-", 80)
+ s := "0123456789"
+ for _, n := range []int{5, 10} {
+ for _, c := range []int{1, 2, 6} {
+ b.Run(fmt.Sprintf("%dx%d", n, c), func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ Repeat(s[:n], c)
+ }
+ })
+ }
}
}