summaryrefslogtreecommitdiff
path: root/tests/jpeg
diff options
context:
space:
mode:
Diffstat (limited to 'tests/jpeg')
-rw-r--r--tests/jpeg/jpeg_resolution.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/jpeg/jpeg_resolution.c b/tests/jpeg/jpeg_resolution.c
index 2934dbf..386f5f3 100644
--- a/tests/jpeg/jpeg_resolution.c
+++ b/tests/jpeg/jpeg_resolution.c
@@ -17,9 +17,12 @@ int main()
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;
}