summaryrefslogtreecommitdiff
path: root/tests/png
diff options
context:
space:
mode:
Diffstat (limited to 'tests/png')
-rw-r--r--tests/png/png_resolution.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/png/png_resolution.c b/tests/png/png_resolution.c
index 21da964..aed7545 100644
--- a/tests/png/png_resolution.c
+++ b/tests/png/png_resolution.c
@@ -17,13 +17,14 @@ int main()
gdImageDestroy(im);
im = gdImageCreateFromPngPtr(size, data);
- if (gdTestAssert(gdImageResolutionX(im) == 72) || gdTestAssert(gdImageResolutionY(im) == 300)) {
- gdFree(data);
+ 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;
}
- gdFree(data);
gdImageDestroy(im);
return 0;
}