diff options
author | Pierre Joye <pierre.php@gmail.com> | 2021-08-25 18:44:02 +0700 |
---|---|---|
committer | Pierre Joye <pierre.php@gmail.com> | 2021-08-25 18:44:02 +0700 |
commit | 67cc752b40393cfed9602a8614c9b19aaf35ac61 (patch) | |
tree | 38e0517514edffc44f9fcc1897f3820e20c70d9e /tests | |
parent | bdc281eadb1d58d5c0c7bbc1125ee4674256df08 (diff) | |
download | libgd-67cc752b40393cfed9602a8614c9b19aaf35ac61.tar.gz |
Fix #405, -1 aims to reset the transparent color; refactor a bit; add test to existing test for -1
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gdimagecolortransparent/gdimagecolortransparent.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/gdimagecolortransparent/gdimagecolortransparent.c b/tests/gdimagecolortransparent/gdimagecolortransparent.c index aca380b..7d6e234 100644 --- a/tests/gdimagecolortransparent/gdimagecolortransparent.c +++ b/tests/gdimagecolortransparent/gdimagecolortransparent.c @@ -15,6 +15,7 @@ int main() if(im->transparent == pos) { error = -1; + goto exit; } pos = -2; @@ -22,7 +23,14 @@ int main() gdImageColorTransparent(im, pos); if(im->transparent == pos) { - error = -1; + error = -2; + goto exit; + } + + pos = -1; + gdImageColorTransparent(im, pos); + if(im->transparent == pos) { + error = -3; } gdImageDestroy(im); |