Commit 930ce09c authored by Ian Davis's avatar Ian Davis Committed by Daniel Martí

image/png: minor cleanup of a few tests

Removes a redundant err check and replaces some returns in a testing
loop with continue to prevent skipping unrelated test cases when
a failure is encountered.

Change-Id: Ic1a560751b95bb0ef8dfa957e057e0fa0c2b281d
Reviewed-on: https://go-review.googlesource.com/134236
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarDaniel Martí <mvdan@mvdan.cc>
parent adcecbe0
......@@ -364,10 +364,6 @@ func TestReader(t *testing.T) {
}
defer sf.Close()
sb := bufio.NewScanner(sf)
if err != nil {
t.Error(fn, err)
continue
}
// Compare the two, in SNG format, line by line.
for {
......
......@@ -61,12 +61,12 @@ func TestWriter(t *testing.T) {
m1, err := readPNG(qfn)
if err != nil {
t.Error(fn, err)
return
continue
}
m2, err := encodeDecode(m1)
if err != nil {
t.Error(fn, err)
return
continue
}
// Compare the two.
err = diff(m0, m2)
......
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