kalle                                    Thu, 30 Jul 2009 03:54:27 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=286540

Log:
Test case for bug #42434

Bug: http://bugs.php.net/42434 (Closed) ImageLine w/ antialias = 1px shorter
      
Changed paths:
    A   php/php-src/branches/PHP_5_2/ext/gd/tests/bug42434.phpt
    A   php/php-src/branches/PHP_5_3/ext/gd/tests/bug42434.phpt
    A   php/php-src/trunk/ext/gd/tests/bug42434.phpt

Added: php/php-src/branches/PHP_5_2/ext/gd/tests/bug42434.phpt
===================================================================
--- php/php-src/branches/PHP_5_2/ext/gd/tests/bug42434.phpt                     
        (rev 0)
+++ php/php-src/branches/PHP_5_2/ext/gd/tests/bug42434.phpt     2009-07-30 
03:54:27 UTC (rev 286540)
@@ -0,0 +1,26 @@
+--TEST--
+Bug #42434 (ImageLine w/ antialias = 1px shorter)
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) {
+       die('skip gd extension not available');
+}
+?>
+--FILE--
+<?php
+$im = imagecreatetruecolor(10, 2);
+imagefilledrectangle($im, 0, 0, 10, 2, 0xFFFFFF);
+
+imageantialias($im, true);
+imageline($im, 0, 0, 10, 0, 0x000000);
+
+if (imagecolorat($im, 9, 0) == 0x000000) {
+       echo 'DONE';
+} else {
+       echo 'Bugged';
+}
+
+imagedestroy($im);
+?>
+--EXPECTF--
+DONE
\ No newline at end of file

Added: php/php-src/branches/PHP_5_3/ext/gd/tests/bug42434.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/gd/tests/bug42434.phpt                     
        (rev 0)
+++ php/php-src/branches/PHP_5_3/ext/gd/tests/bug42434.phpt     2009-07-30 
03:54:27 UTC (rev 286540)
@@ -0,0 +1,26 @@
+--TEST--
+Bug #42434 (ImageLine w/ antialias = 1px shorter)
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) {
+       die('skip gd extension not available');
+}
+?>
+--FILE--
+<?php
+$im = imagecreatetruecolor(10, 2);
+imagefilledrectangle($im, 0, 0, 10, 2, 0xFFFFFF);
+
+imageantialias($im, true);
+imageline($im, 0, 0, 10, 0, 0x000000);
+
+if (imagecolorat($im, 9, 0) == 0x000000) {
+       echo 'DONE';
+} else {
+       echo 'Bugged';
+}
+
+imagedestroy($im);
+?>
+--EXPECTF--
+DONE
\ No newline at end of file

Added: php/php-src/trunk/ext/gd/tests/bug42434.phpt
===================================================================
--- php/php-src/trunk/ext/gd/tests/bug42434.phpt                                
(rev 0)
+++ php/php-src/trunk/ext/gd/tests/bug42434.phpt        2009-07-30 03:54:27 UTC 
(rev 286540)
@@ -0,0 +1,26 @@
+--TEST--
+Bug #42434 (ImageLine w/ antialias = 1px shorter)
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) {
+       die('skip gd extension not available');
+}
+?>
+--FILE--
+<?php
+$im = imagecreatetruecolor(10, 2);
+imagefilledrectangle($im, 0, 0, 10, 2, 0xFFFFFF);
+
+imageantialias($im, true);
+imageline($im, 0, 0, 10, 0, 0x000000);
+
+if (imagecolorat($im, 9, 0) == 0x000000) {
+       echo 'DONE';
+} else {
+       echo 'Bugged';
+}
+
+imagedestroy($im);
+?>
+--EXPECTF--
+DONE
\ No newline at end of file

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to