(scanner *bufio.Scanner, expectedLine string)
| 288 | } |
| 289 | |
| 290 | func assertLineFound(scanner *bufio.Scanner, expectedLine string) error { |
| 291 | for scanner.Scan() { |
| 292 | line := scanner.Text() |
| 293 | if line == expectedLine { |
| 294 | return nil |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | if err := scanner.Err(); err != nil { |
| 299 | return fmt.Errorf("scan failed: %s", err) |
| 300 | } |
| 301 | |
| 302 | return fmt.Errorf("hit EOF before finding %v", expectedLine) |
| 303 | } |
| 304 | |
| 305 | func BenchmarkGenManToFile(b *testing.B) { |
| 306 | file, err := os.CreateTemp(b.TempDir(), "") |
no test coverage detected