diff options
author | Pierre Joye <pierre.php@gmail.com> | 2021-08-27 01:24:00 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-27 01:24:00 +0700 |
commit | b214ab236acac1fb5cf84491894b544027bccba5 (patch) | |
tree | 0f7081b79b46e6fe388a881aa1cea224e27a6c9a /tests | |
parent | 0bc3170fa7b8cb74868ab477652b541a91ac391d (diff) | |
parent | 3a4d2127efabc98c192335dd482c371a4adda54b (diff) | |
download | libgd-b214ab236acac1fb5cf84491894b544027bccba5.tar.gz |
Merge pull request #737 from libgd/bug/405
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 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/gdimagecolortransparent/gdimagecolortransparent.c b/tests/gdimagecolortransparent/gdimagecolortransparent.c index aca380b..50947bd 100644 --- a/tests/gdimagecolortransparent/gdimagecolortransparent.c +++ b/tests/gdimagecolortransparent/gdimagecolortransparent.c @@ -22,7 +22,13 @@ int main() gdImageColorTransparent(im, pos); if(im->transparent == pos) { - error = -1; + error = -2; + } + + pos = -1; + gdImageColorTransparent(im, pos); + if(im->transparent != pos) { + error = -3; } gdImageDestroy(im); |