Made gofmt happy.

This commit is contained in:
Patrick Connolly
2018-11-21 04:38:35 +08:00
parent 5b8a338409
commit adb02771c6

View File

@@ -7,22 +7,22 @@ import (
)
func TestExtractTopicOrPurpose(t *testing.T) {
testcases := []struct{
input string
testcases := []struct {
input string
wantChangeType string
wantOutput string
wantOutput string
}{
{"@someone set channel topic: one liner", "topic", "one liner"},
{"@someone set channel purpose: one liner", "purpose", "one liner"},
{"@someone set channel topic: multi\nliner", "topic", "multi\nliner"},
{"@someone cleared channel topic", "topic", ""},
{"some unmatched message", "unknown", ""},
{"@someone set channel topic: one liner", "topic", "one liner"},
{"@someone set channel purpose: one liner", "purpose", "one liner"},
{"@someone set channel topic: multi\nliner", "topic", "multi\nliner"},
{"@someone cleared channel topic", "topic", ""},
{"some unmatched message", "unknown", ""},
}
for _, tc := range testcases {
gotChangeType, gotOutput := extractTopicOrPurpose(tc.input)
assert.Equal(t, tc.wantChangeType , gotChangeType)
assert.Equal(t, tc.wantOutput , gotOutput)
assert.Equal(t, tc.wantChangeType, gotChangeType)
assert.Equal(t, tc.wantOutput, gotOutput)
}
}