com php-src: revised bug53156.phpt: ext/gd/tests/bug53156.phpt

From: Date: Mon, 20 Jul 2015 01:05:22 +0000
Subject: com php-src: revised bug53156.phpt: ext/gd/tests/bug53156.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-88074@lists.php.net to get a copy of this message
Commit: 2ec86112932e57b3f28a6448b5175a4089810cea Author: Christoph M. Becker <cmbecker69@gmx.de> Mon, 20 Jul 2015 03:05:22 +0200 Parents: 72b73e24a00b9872214fbcc256ee38431d9c9d47 Branches: PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2ec86112932e57b3f28a6448b5175a4089810cea Log: revised bug53156.phpt Bugs: https://bugs.php.net/53156 Changed paths: M ext/gd/tests/bug53156.phpt Diff: diff --git a/ext/gd/tests/bug53156.phpt b/ext/gd/tests/bug53156.phpt index a269369..24db802 100644 --- a/ext/gd/tests/bug53156.phpt +++ b/ext/gd/tests/bug53156.phpt @@ -20,33 +20,31 @@ function draw_and_check_rectangle($x1, $y1, $x2, $y2) echo 'Rectangle: '; imagerectangle($img, $x1, $y1, $x2, $y2, $black); - draw_and_check_pixel(($x1 + $x2) / 2, $y1); - draw_and_check_pixel($x1, ($y1 + $y2) / 2); - draw_and_check_pixel(($x1 + $x2) / 2, $y2); - draw_and_check_pixel($x2, ($y1 + $y2) / 2); + $x = ($x1 + $x2) / 2; + $y = ($y1 + $y2) / 2; + draw_and_check_pixel($x, $y1); + draw_and_check_pixel($x1, $y); + draw_and_check_pixel($x, $y2); + draw_and_check_pixel($x2, $y); echo PHP_EOL; } $img = imagecreate(110, 210); $bgnd = imagecolorallocate($img, 255, 255, 255); -$black = imagecolorallocate($img, 0, 0, 0); -$red = imagecolorallocate($img, 255, 0, 0); +$black = imagecolorallocate($img, 0, 0, 0); +$red = imagecolorallocate($img, 255, 0, 0); -draw_and_check_rectangle(10, 10, 50, 50); -draw_and_check_rectangle(50, 60, 10, 100); -draw_and_check_rectangle(50, 150, 10, 110); -draw_and_check_rectangle(10, 200, 50, 160); +draw_and_check_rectangle( 10, 10, 50, 50); +draw_and_check_rectangle( 50, 60, 10, 100); +draw_and_check_rectangle( 50, 150, 10, 110); +draw_and_check_rectangle( 10, 200, 50, 160); imagesetthickness($img, 4); -draw_and_check_rectangle(60, 10, 100, 50); -draw_and_check_rectangle(100, 60, 60, 100); -draw_and_check_rectangle(100, 150, 60, 110); -draw_and_check_rectangle(60, 200, 100, 160); +draw_and_check_rectangle( 60, 10, 100, 50); +draw_and_check_rectangle(100, 60, 60, 100); +draw_and_check_rectangle(100, 150, 60, 110); +draw_and_check_rectangle( 60, 200, 100, 160); -imagepng($img, __DIR__ . '/bug53156.png'); -?> ---CLEAN-- -<?php -@unlink(__DIR__ . '/bug53156.png'); +//imagepng($img, __DIR__ . '/bug53156.png'); // debug ?> --EXPECT-- Rectangle: ++++

« previous php.cvs (#88074) next »