// TestFailedDecode checks that the error informs that the image couldn't be
// decoded.
TestFailedDecode checks that the error informs that the image couldn't be
decoded.
// TestFailedDecode checks that the error informs that the image couldn ' t be // decoded .
func TestFailedDecode(t *testing.T) {
	mockOpen(nil)
	defer resetOpen()
	mockDecode(testError)
	defer resetDecode()
	_, _, err := LoadImage("")
	if err == nil {
		t.Fatalf("err = nil")
	}
	if !strings.Contains(err.Error(), "Couldn't decode") {
		t.Fatalf(`Unexpected error message: %q`, err)
	}
}
func TestFailedDecode ( t * testing . T ) { mockOpen ( nil ) defer resetOpen ( ) mockDecode ( testError ) defer resetDecode ( ) _ , _ , err := LoadImage ( " " ) if err == nil { t . Fatalf ( " " ) } if ! strings . Contains ( err . Error ( ) , " " ) { t . Fatalf ( `Unexpected error message: %q` , err ) } }
TestFailedDecode checks that the error informs that the image couldn't be
decoded.
TestFailedDecode checks that the error informs that the image couldn ' t be decoded .