(t *testing.T)
| 47 | } |
| 48 | |
| 49 | func TestErrorsReportingLimit(t *testing.T) { |
| 50 | errors := NewErrors(NewTextSource("hello world")) |
| 51 | for i := 0; i < 2*errors.maxErrorsToReport; i++ { |
| 52 | errors.ReportError(NoLocation, "error %d", i) |
| 53 | } |
| 54 | if !strings.HasSuffix(errors.ToDisplayString(), "100 more errors were truncated") { |
| 55 | t.Errorf("Error truncation did not succeed, got %s, wanted 100 errors truncated", errors.ToDisplayString()) |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | func TestErrorsAppendReportingLimit(t *testing.T) { |
| 60 | errors := NewErrors(NewTextSource("hello world")) |
nothing calls this directly
no test coverage detected