(b *testing.B)
| 229 | } |
| 230 | |
| 231 | func BenchmarkSanitizePackageName(b *testing.B) { |
| 232 | testCases := []string{ |
| 233 | "simple", |
| 234 | "my-package", |
| 235 | "my.package.name", |
| 236 | "123complex-package.name@version", |
| 237 | "very-long-package-name-with-many-special-characters.and.dots", |
| 238 | } |
| 239 | |
| 240 | for _, tc := range testCases { |
| 241 | b.Run(tc, func(b *testing.B) { |
| 242 | for b.Loop() { |
| 243 | SanitizePackageName(tc) |
| 244 | } |
| 245 | }) |
| 246 | } |
| 247 | } |
nothing calls this directly
no test coverage detected