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
This commit is contained in:
Nigel Tao 2014-06-13 17:43:02 +10:00
parent 7d3be61386
commit eb788045d8
1 changed files with 2 additions and 2 deletions

View File

@ -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
}