summaryrefslogtreecommitdiff
path: root/php/test
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2015-12-02 11:28:31 -0800
committerMark Spruiell <mes@zeroc.com>2015-12-02 11:28:31 -0800
commit7ea494f049785c1adf0ec7693cae7744276e42d2 (patch)
tree889a2cdbf371c155a26b6225e2b0c03d58b840ab /php/test
parentFix for ICE-6896 - sporadic binding test failure with the Python language map... (diff)
downloadice-7ea494f049785c1adf0ec7693cae7744276e42d2.tar.bz2
ice-7ea494f049785c1adf0ec7693cae7744276e42d2.tar.xz
ice-7ea494f049785c1adf0ec7693cae7744276e42d2.zip
Fixes for ICE-6905 - support NaN/Infinity in scripting languages
Diffstat (limited to 'php/test')
-rw-r--r--php/test/Ice/operations/Client.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/php/test/Ice/operations/Client.php b/php/test/Ice/operations/Client.php
index e775a01e7ab..d653a0b194b 100644
--- a/php/test/Ice/operations/Client.php
+++ b/php/test/Ice/operations/Client.php
@@ -186,6 +186,17 @@ function twoways($communicator, $p)
$r = $p->opFloatDouble(3.402823466E38, 0.0, $f, $d);
$r = $p->opFloatDouble(-3.402823466E38, 0.0, $f, $d);
+ foreach(array(NAN, -NAN) as $val)
+ {
+ $r = $p->opFloatDouble($val, $val, $f, $d);
+ test(is_nan($r) && is_nan($f) && is_nan($d));
+ }
+ foreach(array(INF, -INF) as $val)
+ {
+ $r = $p->opFloatDouble($val, $val, $f, $d);
+ test(is_infinite($r) && is_infinite($f) && is_infinite($d));
+ }
+
try
{
$r = $p->opFloatDouble(3.402823466E38*2, 0.0, $f, $d);