diff options
author | Ondřej Surý <ondrej@sury.org> | 2013-04-22 23:13:21 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2013-04-22 23:13:21 +0200 |
commit | 38a121e9c4b7cf0ff31d1eee80ed074fa12b01b3 (patch) | |
tree | 516501ea8ed79eddbaa98d26ef71c515f39b45a2 /tests | |
parent | 1a3f355f6a2c86ef7a006949fdd0d0128572ee28 (diff) | |
download | libgd-38a121e9c4b7cf0ff31d1eee80ed074fa12b01b3.tar.gz |
Fix reverted error detection logic regression in png_resolution.c
Diffstat (limited to 'tests')
-rw-r--r-- | tests/png/png_resolution.c | 7 |
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; } |