Commits

Ondřej Surý committed 35ce262

One more gdTestAssert return value check

Comments (0)

Files changed (1)

tests/jpeg/jpeg_resolution.c

 	gdImageDestroy(im);
 
 	im = gdImageCreateFromJpegPtr(size, data);
-	gdTestAssert(gdImageResolutionX(im) == 72);
-	gdTestAssert(gdImageResolutionY(im) == 300);
 	gdFree(data);
+	if (!gdTestAssert(gdImageResolutionX(im) == 72) || !gdTestAssert(gdImageResolutionY(im) == 300)) {
+		gdTestErrorMsg("failed image resolution X (%d != 72) or Y (%d != 300)\n", gdImageResolutionX(im), gdImageResolutionY(im));
+		gdImageDestroy(im);
+		return 1;
+	}
 	gdImageDestroy(im);
 	return 0;
 }