fix warnings

This commit is contained in:
Anton Kaliaev 2017-11-27 18:46:57 -06:00
parent 3822727981
commit c9694b1ba1
No known key found for this signature in database
GPG Key ID: 7B6881D965918214
1 changed files with 5 additions and 5 deletions

View File

@ -45,15 +45,15 @@ func TestMatches(t *testing.T) {
}
for _, tc := range testCases {
query, err := query.New(tc.s)
q, err := query.New(tc.s)
if !tc.err {
require.Nil(t, err)
}
if tc.matches {
assert.True(t, query.Matches(tc.tags), "Query '%s' should match %v", tc.s, tc.tags)
assert.True(t, q.Matches(tc.tags), "Query '%s' should match %v", tc.s, tc.tags)
} else {
assert.False(t, query.Matches(tc.tags), "Query '%s' should not match %v", tc.s, tc.tags)
assert.False(t, q.Matches(tc.tags), "Query '%s' should not match %v", tc.s, tc.tags)
}
}
}
@ -77,9 +77,9 @@ func TestConditions(t *testing.T) {
}
for _, tc := range testCases {
query, err := query.New(tc.s)
q, err := query.New(tc.s)
require.Nil(t, err)
assert.Equal(t, tc.conditions, query.Conditions())
assert.Equal(t, tc.conditions, q.Conditions())
}
}