Skip to content

Commit

Permalink
Simplify TestMessageString
Browse files Browse the repository at this point in the history
  • Loading branch information
jparise committed Jun 9, 2021
1 parent 26c745a commit 88b61c9
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,20 @@ package thriftcheck

import (
"testing"

"go.uber.org/thriftrw/ast"
)

func TestMessageString(t *testing.T) {
node := &ast.Struct{}
tests := []struct {
m *Message
s string
}{
{
&Message{Filename: "a.thrift", Node: node, Check: "check", Severity: Warning, Message: "Warning"},
"a.thrift:0:1:warning: Warning (check)",
&Message{Filename: "a.thrift", Line: 5, Check: "check", Severity: Warning, Message: "Warning"},
"a.thrift:5:1:warning: Warning (check)",
},
{
&Message{Filename: "a.thrift", Node: node, Check: "check", Severity: Error, Message: "Error"},
"a.thrift:0:1:error: Error (check)",
&Message{Filename: "a.thrift", Line: 5, Check: "check", Severity: Error, Message: "Error"},
"a.thrift:5:1:error: Error (check)",
},
}

Expand Down

0 comments on commit 88b61c9

Please sign in to comment.