[PHP-CVS] cvs: php-src /ext/gd/tests gif.phpt
tony2001Tue Jul 1 11:20:15 2008 UTC Modified files: /php-src/ext/gd/tests gif.phpt Log: cleanup on test failure http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/gif.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/gd/tests/gif.phpt diff -u php-src/ext/gd/tests/gif.phpt:1.3 php-src/ext/gd/tests/gif.phpt:1.4 --- php-src/ext/gd/tests/gif.phpt:1.3 Sun Oct 8 13:43:20 2006 +++ php-src/ext/gd/tests/gif.phpt Tue Jul 1 11:20:15 2008 @@ -2,7 +2,7 @@ gif in/out --SKIPIF-- +--CLEAN-- + --EXPECT-- <4 cols: ok <8 cols: ok -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/gd/tests gif.phpt
bjori Sun Oct 8 13:43:20 2006 UTC Modified files: /php-src/ext/gd/tests gif.phpt Log: fix test http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/gif.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/gd/tests/gif.phpt diff -u php-src/ext/gd/tests/gif.phpt:1.2 php-src/ext/gd/tests/gif.phpt:1.3 --- php-src/ext/gd/tests/gif.phpt:1.2 Mon Dec 26 21:41:37 2005 +++ php-src/ext/gd/tests/gif.phpt Sun Oct 8 13:43:20 2006 @@ -2,7 +2,7 @@ gif in/out --SKIPIF-- --EXPECT-- <4 cols: ok -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/gd/tests gif.phpt
On 12/26/05, Nuno Lopes <[EMAIL PROTECTED]> wrote: > Probably you want also to test for imagecreatefromjpeg existence in SKIPIF. Indeed :) thanks for the head up :) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/gd/tests gif.phpt
pajoye Mon Dec 26 21:41:37 2005 EDT Modified files: /php-src/ext/gd/tests gif.phpt Log: - check for jpeg support http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/tests/gif.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/gd/tests/gif.phpt diff -u php-src/ext/gd/tests/gif.phpt:1.1 php-src/ext/gd/tests/gif.phpt:1.2 --- php-src/ext/gd/tests/gif.phpt:1.1 Mon Dec 26 19:11:51 2005 +++ php-src/ext/gd/tests/gif.phpt Mon Dec 26 21:41:37 2005 @@ -2,11 +2,11 @@ gif in/out --SKIPIF-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/gd/tests gif.phpt
Probably you want also to test for imagecreatefromjpeg existence in SKIPIF. Nuno - Original Message - pajoye Mon Dec 26 19:11:51 2005 EDT Added files: /php-src/ext/gd/tests gif.phpt Log: - basic gif i/o test http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/tests/gif.phpt?view=markup&rev=1.1 Index: php-src/ext/gd/tests/gif.phpt +++ php-src/ext/gd/tests/gif.phpt --TEST-- gif in/out --SKIPIF-- if (!function_exists("imagegif") || !function_exists("imagecreatefromgif")) { die("skip gif support unavailable"); } ?> --FILE-- 0) { $r_min = $r - $error; $r_max = $r + $error; $g_min = $g - $error; $g_max = $g + $error; $b_min = $b - $error; $b_max = $b + $error; if ( ($c['red'] >= $r_min || $c['red'] <= $r_max) && ($c['green'] >= $g_min || $c['green'] <= $g_max) && ($c['blue'] >= $b_min || $c['blue'] <= $b_max) ) { return true; } else { return false; } } else { if ($c['red']==$r && $c['green']==$g && $c['blue']==$b) { return true; } else { return false; } } } $cwd = dirname(__FILE__); $im = imagecreate(10,10); $c = imagecolorallocate($im, 255,255,255); imagefilledrectangle($im, 5,5, 10,10, $c); imagegif($im, $cwd . '/test_gif.gif'); if (check_box(255,255,255)) { echo "<4 cols: ok\n"; } $im = imagecreate(10,10); for ($i=0; $i<7; $i++) { $c = imagecolorallocate($im, $i,$i,$i); } imagefilledrectangle($im, 5,5, 10,10, $c); imagegif($im, $cwd . '/test_gif.gif'); $i--; if (check_box($i,$i,$i)) { echo "<8 cols: ok\n"; } $im = imagecreate(10,10); for ($i=0; $i<15; $i++) { $c = imagecolorallocate($im, $i,$i,$i); } imagefilledrectangle($im, 5,5, 10,10, $c); imagegif($im, $cwd . '/test_gif.gif'); $i--; if (check_box($i,$i,$i)) { echo "<16 cols: ok\n"; } $im = imagecreate(10,10); for ($i=0; $i<31; $i++) { $c = imagecolorallocate($im, $i,$i,$i); } imagefilledrectangle($im, 5,5, 10,10, $c); imagegif($im, $cwd . '/test_gif.gif'); $i--; if (check_box($i,$i,$i)) { echo "<32 cols: ok\n"; } $im = imagecreate(10,10); for ($i=0; $i<63; $i++) { $c = imagecolorallocate($im, $i,$i,$i); } imagefilledrectangle($im, 5,5, 10,10, $c); imagegif($im, $cwd . '/test_gif.gif'); $i--; if (check_box($i,$i,$i)) { echo "<64 cols: ok\n"; } $im = imagecreate(10,10); for ($i=0; $i<127; $i++) { $c = imagecolorallocate($im, $i,$i,$i); } imagefilledrectangle($im, 5,5, 10,10, $c); imagegif($im, $cwd . '/test_gif.gif'); $i--; if (check_box($i,$i,$i)) { echo "<128 cols: ok\n"; } $im = imagecreate(10,10); for ($i=0; $i<255; $i++) { $c = imagecolorallocate($im, $i,$i,$i); } imagefilledrectangle($im, 5,5, 10,10, $c); imagegif($im, $cwd . '/test_gif.gif'); $i--; if (check_box($i,$i,$i)) { echo "<256 cols: ok\n"; } $im = imagecreatefromjpeg($cwd . '/conv_test.jpeg'); imagefilledrectangle($im, 5,5, 10,10, 0xff); imagegif($im, $cwd . '/test_gif.gif'); imagegif($im, $cwd . '/test_gif_2.gif'); if (check_box(255,255,255, 10)) { echo ">256 cols: ok\n"; } @unlink($cwd . "/test_gif.gif"); ?> --EXPECT-- <4 cols: ok <8 cols: ok <16 cols: ok <32 cols: ok <64 cols: ok <128 cols: ok <256 cols: ok 256 cols: ok -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/gd/tests gif.phpt
pajoye Mon Dec 26 19:11:51 2005 EDT Added files: /php-src/ext/gd/tests gif.phpt Log: - basic gif i/o test http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/tests/gif.phpt?view=markup&rev=1.1 Index: php-src/ext/gd/tests/gif.phpt +++ php-src/ext/gd/tests/gif.phpt --TEST-- gif in/out --SKIPIF-- --FILE-- 0) { $r_min = $r - $error; $r_max = $r + $error; $g_min = $g - $error; $g_max = $g + $error; $b_min = $b - $error; $b_max = $b + $error; if ( ($c['red'] >= $r_min || $c['red'] <= $r_max) && ($c['green'] >= $g_min || $c['green'] <= $g_max) && ($c['blue'] >= $b_min || $c['blue'] <= $b_max) ) { return true; } else { return false; } } else { if ($c['red']==$r && $c['green']==$g && $c['blue']==$b) { return true; } else { return false; } } } $cwd = dirname(__FILE__); $im = imagecreate(10,10); $c = imagecolorallocate($im, 255,255,255); imagefilledrectangle($im, 5,5, 10,10, $c); imagegif($im, $cwd . '/test_gif.gif'); if (check_box(255,255,255)) { echo "<4 cols: ok\n"; } $im = imagecreate(10,10); for ($i=0; $i<7; $i++) { $c = imagecolorallocate($im, $i,$i,$i); } imagefilledrectangle($im, 5,5, 10,10, $c); imagegif($im, $cwd . '/test_gif.gif'); $i--; if (check_box($i,$i,$i)) { echo "<8 cols: ok\n"; } $im = imagecreate(10,10); for ($i=0; $i<15; $i++) { $c = imagecolorallocate($im, $i,$i,$i); } imagefilledrectangle($im, 5,5, 10,10, $c); imagegif($im, $cwd . '/test_gif.gif'); $i--; if (check_box($i,$i,$i)) { echo "<16 cols: ok\n"; } $im = imagecreate(10,10); for ($i=0; $i<31; $i++) { $c = imagecolorallocate($im, $i,$i,$i); } imagefilledrectangle($im, 5,5, 10,10, $c); imagegif($im, $cwd . '/test_gif.gif'); $i--; if (check_box($i,$i,$i)) { echo "<32 cols: ok\n"; } $im = imagecreate(10,10); for ($i=0; $i<63; $i++) { $c = imagecolorallocate($im, $i,$i,$i); } imagefilledrectangle($im, 5,5, 10,10, $c); imagegif($im, $cwd . '/test_gif.gif'); $i--; if (check_box($i,$i,$i)) { echo "<64 cols: ok\n"; } $im = imagecreate(10,10); for ($i=0; $i<127; $i++) { $c = imagecolorallocate($im, $i,$i,$i); } imagefilledrectangle($im, 5,5, 10,10, $c); imagegif($im, $cwd . '/test_gif.gif'); $i--; if (check_box($i,$i,$i)) { echo "<128 cols: ok\n"; } $im = imagecreate(10,10); for ($i=0; $i<255; $i++) { $c = imagecolorallocate($im, $i,$i,$i); } imagefilledrectangle($im, 5,5, 10,10, $c); imagegif($im, $cwd . '/test_gif.gif'); $i--; if (check_box($i,$i,$i)) { echo "<256 cols: ok\n"; } $im = imagecreatefromjpeg($cwd . '/conv_test.jpeg'); imagefilledrectangle($im, 5,5, 10,10, 0xff); imagegif($im, $cwd . '/test_gif.gif'); imagegif($im, $cwd . '/test_gif_2.gif'); if (check_box(255,255,255, 10)) { echo ">256 cols: ok\n"; } @unlink($cwd . "/test_gif.gif"); ?> --EXPECT-- <4 cols: ok <8 cols: ok <16 cols: ok <32 cols: ok <64 cols: ok <128 cols: ok <256 cols: ok >256 cols: ok -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php