Review: Use assert.Equalf

This commit is contained in:
Patrick Connolly
2018-11-26 12:39:46 +08:00
parent db6093b646
commit e1cf1ee06d

View File

@@ -23,7 +23,7 @@ func TestExtractTopicOrPurpose(t *testing.T) {
for name, tc := range testcases {
gotChangeType, gotOutput := extractTopicOrPurpose(tc.input)
assert.Equal(t, tc.wantChangeType, gotChangeType, "This testcase failed: " + name)
assert.Equal(t, tc.wantOutput, gotOutput, "This testcase failed: " + name)
assert.Equalf(t, tc.wantChangeType, gotChangeType, "This testcase failed: %s", name)
assert.Equalf(t, tc.wantOutput, gotOutput, "This testcase failed: %s", name)
}
}