summaryrefslogtreecommitdiff
path: root/ruby/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 /ruby/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 'ruby/test')
-rw-r--r--ruby/test/Ice/operations/Twoways.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/ruby/test/Ice/operations/Twoways.rb b/ruby/test/Ice/operations/Twoways.rb
index c11a4955fd5..453a048b219 100644
--- a/ruby/test/Ice/operations/Twoways.rb
+++ b/ruby/test/Ice/operations/Twoways.rb
@@ -135,6 +135,15 @@ def twoways(communicator, p)
r, f, d = p.opFloatDouble(3.402823466E38, 0.0)
r, f, d = p.opFloatDouble(-3.402823466E38, 0.0)
+ for val in [Float::NAN, -Float::NAN]
+ r, f, d = p.opFloatDouble(val, val)
+ test(r.nan? && f.nan? && d.nan?)
+ end
+ for val in [Float::INFINITY, -Float::INFINITY]
+ r, f, d = p.opFloatDouble(val, val)
+ test(r.infinite? != 0 && f.infinite? != 0 && d.infinite? != 0)
+ end
+
begin
r, f, d = p.opFloatDouble(3.402823466E38*2, 0.0)
test(false)