Replaced t.Fatalf with t.Errorf for non-critical errors to footprint more failing test cases for better analysis of the error.
Change-Id: I6f51d21e37a4ddb95d239d8afed2154f3ef52d31
GitHub-Last-Rev:
d56aa49bced80c80f1177ae4b9ce038265ead551
GitHub-Pull-Request: golang/go#60524
Reviewed-on: https://go-review.googlesource.com/c/go/+/499336
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
var w bytes.Buffer
err := Encode(&w, img, &Options{Quality: q})
if err != nil {
- t.Fatalf("failed to encode valid image: %s", err)
+ t.Errorf("failed to encode valid image: %s", err)
+ continue
}
img1, err := Decode(&w)
if err != nil {
- t.Fatalf("failed to decode roundtripped image: %s", err)
+ t.Errorf("failed to decode roundtripped image: %s", err)
+ continue
}
got := img1.Bounds()
want := img.Bounds()
if !got.Eq(want) {
- t.Fatalf("roundtripped image bounds have changed, got: %s, want: %s", got, want)
+ t.Errorf("roundtripped image bounds have changed, got: %s, want: %s", got, want)
}
}
})
e := &Encoder{CompressionLevel: l}
err = e.Encode(&w, img)
if err != nil {
- t.Fatalf("failed to encode valid image: %s", err)
+ t.Errorf("failed to encode valid image: %s", err)
+ continue
}
img1, err := Decode(&w)
if err != nil {
- t.Fatalf("failed to decode roundtripped image: %s", err)
+ t.Errorf("failed to decode roundtripped image: %s", err)
+ continue
}
got := img1.Bounds()
want := img.Bounds()
if !got.Eq(want) {
- t.Fatalf("roundtripped image bounds have changed, got: %s, want: %s", got, want)
+ t.Errorf("roundtripped image bounds have changed, got: %s, want: %s", got, want)
}
}
})