20
21
22
23
24
25
26
27
28
29
|
io.Copy(&output, decoder)
processed := output.Bytes()
delta := diff.Diff(diff.D{Len1: len(data), Len2: len(processed),
EqualFunc: func(i, j int) bool { return data[i] == processed[j] }})
if len(delta.Added) > 0 || len(delta.Removed) > 0 {
t.Error("Differences detected ", delta)
}
}
|
|
|
20
21
22
23
24
25
26
27
28
29
|
io.Copy(&output, decoder)
processed := output.Bytes()
delta := diff.Diff(diff.D{Len1: len(data), Len2: len(processed),
EqualFunc: func(i, j int) bool { return data[i] == processed[j] }})
if len(delta.Added) > 0 || len(delta.Removed) > 0 {
t.Error("Differences detected ", delta, processed)
}
}
|