@@ -58,12 +58,12 @@ func Test{{ $StructName }}{{ .Dir }}(t *testing.T) {
5858 }
5959 if shouldPass {
6060 if err != nil {
61- t.Errorf (err . Error () )
61+ t.Error (err )
6262 return
6363 }
6464 result, err := parser.Result ()
6565 if err != nil {
66- t.Errorf (err . Error () )
66+ t.Error (err )
6767 return
6868 }
6969 var returnLine string
@@ -73,15 +73,15 @@ func Test{{ $StructName }}{{ .Dir }}(t *testing.T) {
7373 returnLine = fmt.Sprintf (" %s # %s " , result[0].Data , result[0].Comment )
7474 }
7575 if command != returnLine {
76- t.Errorf (fmt .Sprintf ( " error: has [%s ] expects [%s ]" , returnLine, command) )
76+ t.Errorf (" error: has [%s ] expects [%s ]" , returnLine, command)
7777 }
7878 } else {
7979 if err == nil {
80- t.Errorf (fmt .Sprintf ( " error: did not throw error for line [%s ]" , line) )
80+ t.Errorf (" error: did not throw error for line [%s ]" , line)
8181 }
8282 _, parseErr := parser.Result ()
8383 if parseErr == nil {
84- t.Errorf (fmt .Sprintf ( " error: did not throw error on result for line [%s ]" , line) )
84+ t.Errorf (" error: did not throw error on result for line [%s ]" , line)
8585 }
8686 }
8787 })
@@ -104,12 +104,12 @@ func Test{{ $StructName }}{{ .Dir }}(t *testing.T) {
104104 err = ProcessLine(line, parser)
105105 }
106106 if err != nil {
107- t.Errorf (err . Error () )
107+ t.Error (err )
108108 return
109109 }
110110 result, err := parser.Result ()
111111 if err != nil {
112- t.Errorf (err . Error () )
112+ t.Error (err )
113113 return
114114 }
115115 var returnLine string
@@ -119,7 +119,7 @@ func Test{{ $StructName }}{{ .Dir }}(t *testing.T) {
119119 returnLine = fmt.Sprintf (" %s # %s " , result[0].Data , result[0].Comment )
120120 }
121121 if expected != returnLine {
122- t.Errorf (fmt .Sprintf ( " error: has [%s ] expects [%s ]" , returnLine, expected) )
122+ t.Errorf (" error: has [%s ] expects [%s ]" , returnLine, expected)
123123 }
124124 })
125125 }
@@ -156,12 +156,12 @@ func TestAlias{{ $StructName }}{{ .Dir }}(t *testing.T) {
156156 }
157157 if shouldPass {
158158 if err != nil {
159- t.Errorf (err . Error () )
159+ t.Error (err )
160160 return
161161 }
162162 result, err := parser.Result ()
163163 if err != nil {
164- t.Errorf (err . Error () )
164+ t.Error (err )
165165 return
166166 }
167167 var returnLine string
@@ -171,15 +171,15 @@ func TestAlias{{ $StructName }}{{ .Dir }}(t *testing.T) {
171171 returnLine = fmt.Sprintf (" %s # %s " , result[0].Data , result[0].Comment )
172172 }
173173 if command != returnLine {
174- t.Errorf (fmt .Sprintf ( " error: has [%s ] expects [%s ]" , returnLine, command) )
174+ t.Errorf (" error: has [%s ] expects [%s ]" , returnLine, command)
175175 }
176176 } else {
177177 if err == nil {
178- t.Errorf (fmt .Sprintf ( " error: did not throw error for line [%s ]" , line) )
178+ t.Errorf (" error: did not throw error for line [%s ]" , line)
179179 }
180180 _, parseErr := parser.Result ()
181181 if parseErr == nil {
182- t.Errorf (fmt .Sprintf ( " error: did not throw error on result for line [%s ]" , line) )
182+ t.Errorf (" error: did not throw error on result for line [%s ]" , line)
183183 }
184184 }
185185 })
0 commit comments