tony2001 Fri Dec 16 15:52:54 2005 EDT
Modified files:
/php-src/ext/standard/tests/array bug35014_64bit.phpt bug35014.phpt
Log:
MF51: fix test, add new one
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/tests/array/bug35014_64bit.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/array/bug35014_64bit.phpt
diff -u /dev/null php-src/ext/standard/tests/array/bug35014_64bit.phpt:1.2
--- /dev/null Fri Dec 16 15:52:54 2005
+++ php-src/ext/standard/tests/array/bug35014_64bit.phpt Fri Dec 16
15:52:54 2005
@@ -0,0 +1,36 @@
+--TEST--
+Bug #35014 (array_product() always returns 0) (64bit)
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
?>
+--INI--
+precision=14
+--FILE--
+<?php
+$tests = array(
+ 'foo',
+ array(),
+ array(0),
+ array(3),
+ array(3, 3),
+ array(0.5, 2),
+ array(99999999, 99999999),
+ array(8.993, 7443241,988, sprintf("%u", -1)+0.44),
+ array(2,sprintf("%u", -1)),
+);
+
+foreach ($tests as $v) {
+ var_dump(array_product($v));
+}
+?>
+--EXPECTF--
+
+Warning: array_product(): The argument should be an array in %s on line %d
+NULL
+int(0)
+int(0)
+int(3)
+int(9)
+float(1)
+int(9999999800000001)
+float(2.8404260053903E+20)
+int(8589934590)
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/tests/array/bug35014.phpt?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/standard/tests/array/bug35014.phpt
diff -u php-src/ext/standard/tests/array/bug35014.phpt:1.3
php-src/ext/standard/tests/array/bug35014.phpt:1.4
--- php-src/ext/standard/tests/array/bug35014.phpt:1.3 Tue Nov 1 22:42:03 2005
+++ php-src/ext/standard/tests/array/bug35014.phpt Fri Dec 16 15:52:54 2005
@@ -1,5 +1,7 @@
--TEST--
-Bug #35014 (array_product() always returns 0)
+Bug #35014 (array_product() always returns 0) (32bit)
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
?>
--INI--
precision=14
--FILE--
@@ -22,7 +24,7 @@
?>
--EXPECTF--
-Warning: array_product(): The argument should be an array in %s/bug35014.php
on line 15
+Warning: array_product(): The argument should be an array in %s on line %d
NULL
int(0)
int(0)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php