diff options
| author | Fuwn <[email protected]> | 2026-01-31 17:38:23 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-01-31 17:38:23 +0000 |
| commit | d7b0de9f8b3f0722043207824061ac57c1490af2 (patch) | |
| tree | 897641a91d0be43758fd31bab45eee4512f7bd45 /formatter_bench_test.go | |
| parent | refactor: Split formatter.go into separate files (diff) | |
| download | iku-d7b0de9f8b3f0722043207824061ac57c1490af2.tar.xz iku-d7b0de9f8b3f0722043207824061ac57c1490af2.zip | |
style: Use idiomatic Go test naming conventions
Diffstat (limited to 'formatter_bench_test.go')
| -rw-r--r-- | formatter_bench_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/formatter_bench_test.go b/formatter_bench_test.go index 2a6d3cd..0820a10 100644 --- a/formatter_bench_test.go +++ b/formatter_bench_test.go @@ -5,7 +5,7 @@ import ( "testing" ) -func BenchmarkFormat_Small(benchmarkRunner *testing.B) { +func BenchmarkFormatSmall(b *testing.B) { inputSource := []byte(`package main func main() { x := 1 @@ -18,12 +18,12 @@ func main() { `) formatter := &Formatter{CommentMode: CommentsFollow} - for benchmarkRunner.Loop() { + for b.Loop() { _, _ = formatter.Format(inputSource) } } -func BenchmarkFormat_Large(benchmarkRunner *testing.B) { +func BenchmarkFormatLarge(b *testing.B) { var sourceBuilder strings.Builder sourceBuilder.WriteString("package main\n\n") @@ -43,7 +43,7 @@ func BenchmarkFormat_Large(benchmarkRunner *testing.B) { inputSource := []byte(sourceBuilder.String()) formatter := &Formatter{CommentMode: CommentsFollow} - for benchmarkRunner.Loop() { + for b.Loop() { _, _ = formatter.Format(inputSource) } } |