diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-02-11 21:57:10 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-02-11 21:57:10 +0000 |
commit | 2f1bf4fae3206c9fb02b9966d546d4c96b3343cd (patch) | |
tree | e7c9982f8a7b2350e05007fa5b3e27a7ce79ea9c /spec | |
parent | 63f990674bdf474f0ce88a23f0bc06b4443d3a94 (diff) | |
download | ruby-2f1bf4fae3206c9fb02b9966d546d4c96b3343cd.tar.gz |
Accept a third value for NaNs, as produced by the Sun Studio C Compiler
* See http://rubyci.s3.amazonaws.com/solaris11s-sunc/ruby-trunk/log/20190211T142523Z.fail.html.gz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ruby/core/array/pack/shared/float.rb | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/spec/ruby/core/array/pack/shared/float.rb b/spec/ruby/core/array/pack/shared/float.rb index 6fc3b6b359..b9864adef5 100644 --- a/spec/ruby/core/array/pack/shared/float.rb +++ b/spec/ruby/core/array/pack/shared/float.rb @@ -42,7 +42,7 @@ describe :array_pack_float_le, shared: true do end it "encodes NaN" do - nans = ["\x00\x00\xc0\xff", "\x00\x00\xc0\x7f"] + nans = ["\x00\x00\xc0\xff", "\x00\x00\xc0\x7f", "\xFF\xFF\xFF\x7F"] nans.should include([nan_value].pack(pack_format)) end @@ -97,7 +97,7 @@ describe :array_pack_float_be, shared: true do end it "encodes NaN" do - nans = ["\xff\xc0\x00\x00", "\x7f\xc0\x00\x00"] + nans = ["\xff\xc0\x00\x00", "\x7f\xc0\x00\x00", "\x7F\xFF\xFF\xFF"] nans.should include([nan_value].pack(pack_format)) end @@ -152,7 +152,11 @@ describe :array_pack_double_le, shared: true do end it "encodes NaN" do - nans = ["\x00\x00\x00\x00\x00\x00\xf8\xff", "\x00\x00\x00\x00\x00\x00\xf8\x7f"] + nans = [ + "\x00\x00\x00\x00\x00\x00\xf8\xff", + "\x00\x00\x00\x00\x00\x00\xf8\x7f", + "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F" + ] nans.should include([nan_value].pack(pack_format)) end @@ -207,7 +211,11 @@ describe :array_pack_double_be, shared: true do end it "encodes NaN" do - nans = ["\xff\xf8\x00\x00\x00\x00\x00\x00", "\x7f\xf8\x00\x00\x00\x00\x00\x00"] + nans = [ + "\xff\xf8\x00\x00\x00\x00\x00\x00", + "\x7f\xf8\x00\x00\x00\x00\x00\x00", + "\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF" + ] nans.should include([nan_value].pack(pack_format)) end |