@@ -1317,6 +1317,26 @@ using the AllowUnexported option.`, "\n"),
1317
1317
x : "d5c14bdf6bac81c27afc5429500ed750\n 25483503b557c606dad4f144d27ae10b\n 90bdbcdbb6ea7156068e3dcfb7459244\n 978f480a6e3cced51e297fbff9a506b7\n " ,
1318
1318
y : "Xd5c14bdf6bac81c27afc5429500ed750\n X25483503b557c606dad4f144d27ae10b\n X90bdbcdbb6ea7156068e3dcfb7459244\n X978f480a6e3cced51e297fbff9a506b7\n " ,
1319
1319
reason : "all lines are different, so diffing based on lines is pointless" ,
1320
+ }, {
1321
+ label : label + "/StringifiedBytes" ,
1322
+ x : struct { X []byte }{[]byte ("hello, world!" )},
1323
+ y : struct { X []byte }{},
1324
+ reason : "[]byte should be printed as text since it is printable text" ,
1325
+ }, {
1326
+ label : label + "/NonStringifiedBytes" ,
1327
+ x : struct { X []byte }{[]byte ("\xde \xad \xbe \xef " )},
1328
+ y : struct { X []byte }{},
1329
+ reason : "[]byte should not be printed as text since it is binary data" ,
1330
+ }, {
1331
+ label : label + "/StringifiedNamedBytes" ,
1332
+ x : struct { X MyBytes }{MyBytes ("hello, world!" )},
1333
+ y : struct { X MyBytes }{},
1334
+ reason : "MyBytes should be printed as text since it is printable text" ,
1335
+ }, {
1336
+ label : label + "/NonStringifiedNamedBytes" ,
1337
+ x : struct { X MyBytes }{MyBytes ("\xde \xad \xbe \xef " )},
1338
+ y : struct { X MyBytes }{},
1339
+ reason : "MyBytes should not be printed as text since it is binary data" ,
1320
1340
}}
1321
1341
}
1322
1342
0 commit comments