Annotation of embedaddon/php/ext/gd/tests/imagetruecolortopalette_error4.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Testing imagetruecolortopalette(): out of range parameter 3
3: --CREDITS--
4: Rafael Dohms <rdohms [at] gmail [dot] com>
5: --SKIPIF--
6: <?php
7: if (!extension_loaded("gd")) die("skip GD not present");
8: if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
9: ?>
10: --FILE--
11: <?php
12: $image = imagecreatetruecolor(50, 50);
13:
14: imagetruecolortopalette($image, true, 0);
15: imagetruecolortopalette($image, true, -1);
16:
17: ?>
18: --EXPECTF--
19: Warning: imagetruecolortopalette(): Number of colors has to be greater than zero in %s on line %d
20:
21: Warning: imagetruecolortopalette(): Number of colors has to be greater than zero in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>