(t *testing.T)
| 429 | } |
| 430 | |
| 431 | func TestConfig_SeverityString(t *testing.T) { |
| 432 | tests := []struct { |
| 433 | severity lint.Severity |
| 434 | expected string |
| 435 | }{ |
| 436 | {lint.SeverityError, "Error"}, |
| 437 | {lint.SeverityWarn, "Warning"}, |
| 438 | {lint.Severity("unknown"), "Severity(unknown)"}, |
| 439 | } |
| 440 | |
| 441 | for _, tc := range tests { |
| 442 | got := tc.severity.String() |
| 443 | if got != tc.expected { |
| 444 | t.Errorf("Severity(%q).String() = %q, want %q", tc.severity, got, tc.expected) |
| 445 | } |
| 446 | } |
| 447 | } |