--- Issue properties ---
(t *testing.T)
| 535 | // --- Issue properties --- |
| 536 | |
| 537 | func TestIssue_Properties(t *testing.T) { |
| 538 | issue := lint.NewIssue("test desc", "info1", "info2") |
| 539 | if issue.Description() != "test desc" { |
| 540 | t.Errorf("got desc %q", issue.Description()) |
| 541 | } |
| 542 | if len(issue.Infos()) != 2 { |
| 543 | t.Errorf("expected 2 infos, got %d", len(issue.Infos())) |
| 544 | } |
| 545 | if issue.Infos()[0] != "info1" { |
| 546 | t.Errorf("got info[0] %q", issue.Infos()[0]) |
| 547 | } |
| 548 | } |
| 549 | |
| 550 | func TestIssue_NoInfos(t *testing.T) { |
| 551 | issue := lint.NewIssue("desc only") |
nothing calls this directly
no test coverage detected