(b *testing.B)
| 568 | } |
| 569 | |
| 570 | func BenchmarkFormatErrorWithContext(b *testing.B) { |
| 571 | err := NewError(ErrCodeUnexpectedToken, "unexpected token", models.Location{Line: 1, Column: 10}). |
| 572 | WithContext("SELECT * FORM users WHERE age > 18", 4) |
| 573 | sql := "SELECT * FORM users WHERE age > 18" |
| 574 | |
| 575 | b.ResetTimer() |
| 576 | for i := 0; i < b.N; i++ { |
| 577 | _ = FormatErrorWithContext(err, sql) |
| 578 | } |
| 579 | } |
| 580 | |
| 581 | func BenchmarkFormatMultiLineContext(b *testing.B) { |
| 582 | sql := `SELECT id, name, email |
nothing calls this directly
no test coverage detected