15 lines
336 B
Go
15 lines
336 B
Go
package main
|
|
|
|
import "testing"
|
|
|
|
func TestSeverity(t *testing.T) {
|
|
for _, tc := range []struct {
|
|
in int
|
|
want string
|
|
}{{1, "error"}, {2, "warning"}, {3, "info"}, {4, "hint"}, {0, "diagnostic"}, {9, "diagnostic"}} {
|
|
if got := severity(tc.in); got != tc.want {
|
|
t.Errorf("severity(%d)=%q want %q", tc.in, got, tc.want)
|
|
}
|
|
}
|
|
}
|