mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Skip IntlTimeZone::getOffset() error tests on non-x86
I'm not totally sure, but I have a strong suspicion that the fact that this produces an error is an artifact of undefined cast behavior (which will yield INDVAL on x86 but saturate on ARM). INF seems to be the only value that results in an error even on x86 (variations like -INF or NAN succeed). It might make sense to just remove this test entirely, but for now let's skip it on non-x86.
This commit is contained in:
parent
edf7346810
commit
93a9b56c90
@ -4,6 +4,11 @@ IntlTimeZone::getErrorCode/Message(): basic test
|
||||
<?php
|
||||
if (!extension_loaded('intl'))
|
||||
die('skip intl extension not enabled');
|
||||
/* INF being an invalid offset depends on UB in float->int cast behavior. */
|
||||
$arch = php_uname('m');
|
||||
if ($arch != 'x86_64' && $arch != 'i386')
|
||||
die('skip requires x86');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
ini_set("intl.error_level", E_WARNING);
|
||||
@ -28,4 +33,4 @@ Warning: IntlTimeZone::getOffset(): intltz_get_offset: error obtaining offset in
|
||||
bool(false)
|
||||
int(1)
|
||||
string(67) "intltz_get_offset: error obtaining offset: U_ILLEGAL_ARGUMENT_ERROR"
|
||||
==DONE==
|
||||
==DONE==
|
||||
|
@ -4,6 +4,12 @@ IntlTimeZone::getOffset(): errors
|
||||
<?php
|
||||
if (!extension_loaded('intl'))
|
||||
die('skip intl extension not enabled');
|
||||
|
||||
/* INF being an invalid offset depends on UB in float->int cast behavior. */
|
||||
$arch = php_uname('m');
|
||||
if ($arch != 'x86_64' && $arch != 'i386')
|
||||
die('skip requires x86');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
ini_set("intl.error_level", E_WARNING);
|
||||
|
Loading…
Reference in New Issue
Block a user