]> granicus.if.org Git - php/commit
A picture is worth a thousand message digests
authorChristoph M. Becker <cmbecker69@gmx.de>
Sun, 19 Jun 2016 12:29:27 +0000 (14:29 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Sun, 11 Sep 2016 10:56:53 +0000 (12:56 +0200)
commitdc09f309335cf8df7d39adc03580ac8d4f0c78f5
tree1fbcf941a8fa538c889be5780e7e8dd24b81f07d
parent326a4e38fbe8fd776624fc9891ad6a91a034504b
A picture is worth a thousand message digests

The bundled GD test suites makes heavy use of md5() to verify the result
of drawing operations. This leads to fragile tests (even a slight change
in a PNG header would cause failure, and of course there is the
possibility of collisions), and even worse, eventual test failures are
rather unrevealing.

Therefore we replace all md5() verification with a simplistic
test_image_equals_file(), which is basically a simplified port of libgd's
gdTestImageCompareToFile(), adapted to the needs of PHPTs.

In the long run better tests helpers should be introduced (see also
<http://news.php.net/php.internals/94081>), but for now this solution
is preferable over the former.

(cherry picked from commit 24f9e96792518ec2a75f26b1eb2471dd7694f2b7)
66 files changed:
.gitignore
ext/gd/tests/bug22544.phpt
ext/gd/tests/bug22544.png [new file with mode: 0644]
ext/gd/tests/bug43828.phpt
ext/gd/tests/bug43828.png [new file with mode: 0644]
ext/gd/tests/bug66005.phpt
ext/gd/tests/bug66005.png [new file with mode: 0644]
ext/gd/tests/bug72604.phpt
ext/gd/tests/bug72604.png [new file with mode: 0644]
ext/gd/tests/bug72913.phpt
ext/gd/tests/bug72913.png [new file with mode: 0644]
ext/gd/tests/func.inc
ext/gd/tests/imagearc_basic.phpt
ext/gd/tests/imagearc_basic.png [new file with mode: 0644]
ext/gd/tests/imagearc_error1.phpt
ext/gd/tests/imagearc_error1.png [new file with mode: 0644]
ext/gd/tests/imagearc_variation1.phpt
ext/gd/tests/imagearc_variation1.png [new file with mode: 0644]
ext/gd/tests/imagearc_variation2.phpt
ext/gd/tests/imagearc_variation2.png [new file with mode: 0644]
ext/gd/tests/imagechar_basic.phpt
ext/gd/tests/imagechar_basic.png [new file with mode: 0644]
ext/gd/tests/imagecharup_basic.phpt
ext/gd/tests/imagecharup_basic.png [new file with mode: 0644]
ext/gd/tests/imagecolorallocatealpha_basic.phpt
ext/gd/tests/imagecolorallocatealpha_basic.png [new file with mode: 0644]
ext/gd/tests/imagecolorset_basic.phpt
ext/gd/tests/imagecolorset_basic.png [new file with mode: 0644]
ext/gd/tests/imageconvolution_basic.phpt
ext/gd/tests/imageconvolution_basic.png [new file with mode: 0644]
ext/gd/tests/imagecreatetruecolor_basic.phpt
ext/gd/tests/imagecreatetruecolor_basic.png [new file with mode: 0644]
ext/gd/tests/imageellipse_basic.phpt
ext/gd/tests/imageellipse_basic.png [new file with mode: 0644]
ext/gd/tests/imagefilledarc_basic.phpt
ext/gd/tests/imagefilledarc_basic.png [new file with mode: 0644]
ext/gd/tests/imagefilledarc_error1.phpt
ext/gd/tests/imagefilledarc_error1.png [new file with mode: 0644]
ext/gd/tests/imagefilledarc_variation1.phpt
ext/gd/tests/imagefilledarc_variation1.png [new file with mode: 0644]
ext/gd/tests/imagefilledarc_variation2.phpt
ext/gd/tests/imagefilledarc_variation2.png [new file with mode: 0644]
ext/gd/tests/imagefilledellipse_basic.phpt
ext/gd/tests/imagefilledellipse_basic.png [new file with mode: 0644]
ext/gd/tests/imagefilltoborder_basic.phpt
ext/gd/tests/imagefilltoborder_basic.png [new file with mode: 0644]
ext/gd/tests/imagegammacorrect_basic.phpt
ext/gd/tests/imagegammacorrect_basic.png [new file with mode: 0644]
ext/gd/tests/imagegammacorrect_variation1.phpt
ext/gd/tests/imagegammacorrect_variation1.png [new file with mode: 0644]
ext/gd/tests/imagelayereffect_basic.phpt
ext/gd/tests/imagelayereffect_basic.png [new file with mode: 0644]
ext/gd/tests/imagerectangle_basic.phpt
ext/gd/tests/imagerectangle_basic.png [new file with mode: 0644]
ext/gd/tests/imagesetbrush_basic.phpt
ext/gd/tests/imagesetbrush_basic.png [new file with mode: 0644]
ext/gd/tests/imagesetthickness_basic.phpt
ext/gd/tests/imagesetthickness_basic.png [new file with mode: 0644]
ext/gd/tests/imagestring_basic.phpt
ext/gd/tests/imagestring_basic.png [new file with mode: 0644]
ext/gd/tests/imagestringup_basic.phpt
ext/gd/tests/imagestringup_basic.png [new file with mode: 0644]
ext/gd/tests/imagetruecolortopalette_basic.phpt
ext/gd/tests/imagetruecolortopalette_basic.png [new file with mode: 0644]
ext/gd/tests/libgd00100.phpt
ext/gd/tests/libgd00100.png [new file with mode: 0644]