]> granicus.if.org Git - php/commitdiff
- add truecolortopallete and istruecolor test
authorPierre Joye <pajoye@php.net>
Sat, 24 Dec 2005 14:05:20 +0000 (14:05 +0000)
committerPierre Joye <pajoye@php.net>
Sat, 24 Dec 2005 14:05:20 +0000 (14:05 +0000)
- titles for colorclosest/resolve...

ext/gd/tests/colorclosest.phpt
ext/gd/tests/colorresolve.phpt
ext/gd/tests/truecolor.phpt [new file with mode: 0644]

index 7a977ced44156c14b47e95959b6926677fbe0ca1..c7437bbaa2a46f67a91a6b0bf9ebb78d9b61ddee 100644 (file)
@@ -2,7 +2,7 @@
 imageclosest
 --SKIPIF--
 <?php
-        if (!function_exists('imageclosest')) die("skip gd extension not available\n");
+        if (!function_exists('imagecolorclosest')) die("skip gd extension not available\n");
 ?>
 --FILE--
 <?php
index 3728460952cb674fbec4fcc044672f0d515d2514..c8e6a345af13713d6a398cc5a5447418e0fc1b5a 100644 (file)
@@ -2,7 +2,7 @@
 imagecolorresolve
 --SKIPIF--
 <?php
-        if (!function_exists('imageresolve')) die("skip gd extension not available\n");
+        if (!function_exists('imagecolorresolve')) die("skip gd extension not available\n");
 ?>
 --FILE--
 <?php
diff --git a/ext/gd/tests/truecolor.phpt b/ext/gd/tests/truecolor.phpt
new file mode 100644 (file)
index 0000000..9e30cbe
--- /dev/null
@@ -0,0 +1,19 @@
+--TEST--
+imageistruecolor, truecolortopalette
+--SKIPIF--
+<?php
+        if (!function_exists('imagetruecolortopalette')) die("skip gd extension not available\n");
+?>
+--FILE--
+<?php
+$im = imagecreatetruecolor(1,1); 
+if (imageistruecolor($im)) echo "ok\n";
+
+if (imagetruecolortopalette($im, 1,2)) echo "ok\n";
+if (!imageistruecolor($im)) echo "ok\n";
+
+?>
+--EXPECTF--
+ok
+ok
+ok