Improve tests to ensure highest severity is retained

pull/907/head
Adnan Abdulhussein 9 years ago
parent 77820c7482
commit 09f56459c7

@ -37,10 +37,12 @@ func TestRunLinterRule(t *testing.T) {
{ErrorSev, lintError, 3, false, ErrorSev},
// No error so it returns true
{ErrorSev, nil, 3, true, ErrorSev},
// Retains highest severity
{InfoSev, lintError, 4, false, ErrorSev},
// Invalid severity values
{4, lintError, 3, false, ErrorSev},
{22, lintError, 3, false, ErrorSev},
{-1, lintError, 3, false, ErrorSev},
{4, lintError, 4, false, ErrorSev},
{22, lintError, 4, false, ErrorSev},
{-1, lintError, 4, false, ErrorSev},
}
for _, test := range tests {

Loading…
Cancel
Save