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