Patch for ext/standard/tests/general_functions/008.phpt
| From: | (Michael Mauch) | Date: | Sun, 10 Nov 2002 22:10:30 +0000 |
| Subject: | Patch for ext/standard/tests/general_functions/008.phpt | ||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-6708@lists.php.net to get a copy of this message | ||
Hi,
on 64 bit machines this test fails, because of:
---- EXPECTED OUTPUT
[...]
[11]=>
float(123456789012)
[12]=>
float(1234567890120)
---- ACTUAL OUTPUT
[...]
[11]=>
int(123456789012)
[12]=>
int(1234567890123)
Apparently these big numbers are ints, they are not automatically
promoted to float. Seeing such a basic test fail on 64 bit machines
really scares me - and probably other people as well.
--- ext/standard/tests/general_functions/008.phpt~ Wed Aug 21 03:27:56 2002
+++ ext/standard/tests/general_functions/008.phpt Sun Nov 10 22:50:29 2002
@@ -5,7 +5,7 @@
--FILE--
<?php
// this checks f,g,G conversion for snprintf/spprintf
-var_dump(array(ini_get('precision'),.012,-.012,.12,-.12,1.2,-1.2,12.,-12.,0.000123,.0000123,123456789012,1234567890123,12345678901234567890));
+var_dump(array(ini_get('precision'),.012,-.012,.12,-.12,1.2,-1.2,12.,-12.,0.000123,.0000123,123456789012,(float)1234567890123,(float)12345678901234567890));
?>
--EXPECT--
array(14) {
PASS var_dump float test [ext/standard/tests/general_functions/008.phpt]
Regards...
Michael