@@ -181,7 +181,7 @@ func TestEncodeOmitEmptyStruct(t *testing.T) {
181
181
}
182
182
}
183
183
184
- func TestEncodeWithOmitEmpty (t * testing.T ) {
184
+ func TestEncodeOmitEmpty (t * testing.T ) {
185
185
type compareable struct {
186
186
Bool bool `toml:"bool,omitempty"`
187
187
}
@@ -245,7 +245,7 @@ time = 1985-06-18T15:16:17Z
245
245
v , expected , nil )
246
246
}
247
247
248
- func TestEncodeWithOmitZero (t * testing.T ) {
248
+ func TestEncodeOmitZero (t * testing.T ) {
249
249
type simple struct {
250
250
Number int `toml:"number,omitzero"`
251
251
Real float64 `toml:"real,omitzero"`
@@ -267,7 +267,7 @@ unsigned = 5
267
267
encodeExpected (t , "simple with omitzero, non-zero" , value , expected , nil )
268
268
}
269
269
270
- func TestEncodeOmitemptyWithEmptyName (t * testing.T ) {
270
+ func TestEncodeOmitemptyEmptyName (t * testing.T ) {
271
271
type simple struct {
272
272
S []int `toml:",omitempty"`
273
273
}
@@ -1187,7 +1187,9 @@ func encodeExpected(t *testing.T, label string, val interface{}, want string, wa
1187
1187
have := strings .TrimSpace (buf .String ())
1188
1188
want = strings .TrimSpace (want )
1189
1189
if want != have {
1190
- t .Errorf ("\n have:\n %s\n want:\n %s\n " , have , want )
1190
+ t .Errorf ("\n have:\n %s\n want:\n %s\n " ,
1191
+ "\t " + strings .ReplaceAll (have , "\n " , "\n \t " ),
1192
+ "\t " + strings .ReplaceAll (want , "\n " , "\n \t " ))
1191
1193
}
1192
1194
})
1193
1195
}
0 commit comments