Skip to content

Commit

Permalink
Shorten test field names
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry-Sarabia committed Feb 20, 2019
1 parent db38658 commit 50bbd71
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions sliceconv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ func TestAtoi(t *testing.T) {

func TestItoa(t *testing.T) {
tests := []struct {
name string
ints []int
wantStrings []string
name string
ints []int
wantStr []string
}{
{"Nil slice", nil, nil},
{"Empty int slice", []int{}, nil},
Expand All @@ -52,8 +52,8 @@ func TestItoa(t *testing.T) {
t.Run(test.name, func(t *testing.T) {
s := Itoa(test.ints)

if !reflect.DeepEqual(s, test.wantStrings) {
t.Errorf("got: <%v>, want: <%v>", s, test.wantStrings)
if !reflect.DeepEqual(s, test.wantStr) {
t.Errorf("got: <%v>, want: <%v>", s, test.wantStr)
}
})
}
Expand Down Expand Up @@ -90,9 +90,9 @@ func TestAtof(t *testing.T) {

func TestFtoa(t *testing.T) {
tests := []struct {
name string
flts []float64
wantStrings []string
name string
flts []float64
wantStr []string
}{
{"Nil slice", nil, nil},
{"Empty float slice", []float64{}, nil},
Expand All @@ -103,8 +103,8 @@ func TestFtoa(t *testing.T) {
t.Run(test.name, func(t *testing.T) {
s := Ftoa(test.flts)

if !reflect.DeepEqual(s, test.wantStrings) {
t.Errorf("got: <%v>, want: <%v>", s, test.wantStrings)
if !reflect.DeepEqual(s, test.wantStr) {
t.Errorf("got: <%v>, want: <%v>", s, test.wantStr)
}
})
}
Expand Down

0 comments on commit 50bbd71

Please sign in to comment.