From de5d9f39b67a196b0f11aef461fd3546ecca25f1 Mon Sep 17 00:00:00 2001 From: vinchent Date: Tue, 10 Sep 2024 13:23:32 +0200 Subject: [PATCH] iteration: add benchmark test --- iteration/iter_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/iteration/iter_test.go b/iteration/iter_test.go index fd7d5e6..47e82cb 100644 --- a/iteration/iter_test.go +++ b/iteration/iter_test.go @@ -10,3 +10,9 @@ func TestRepeat(t *testing.T) { t.Errorf("expected %q but got %q", expected, repeated) } } + +func BenchmarkRepeat(b *testing.B) { + for i := 0; i < b.N; i++ { + Repeat("a") + } +}