Commit eb788045 authored by Nigel Tao's avatar Nigel Tao

image/png: fix compare-to-golden-file test.

bufio.Scanner.Scan returns whether the scan succeeded, not whether it
is done, so the test was mistakenly breaking early.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/93670045
parent 7d3be613
......@@ -235,8 +235,8 @@ func TestReader(t *testing.T) {
// Compare the two, in SNG format, line by line.
for {
pdone := pb.Scan()
sdone := sb.Scan()
pdone := !pb.Scan()
sdone := !sb.Scan()
if pdone && sdone {
break
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment