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
This commit is contained in:
eregon 2019-02-11 21:57:10 +00:00
Родитель 63f990674b
Коммит 2f1bf4fae3
1 изменённых файлов: 12 добавлений и 4 удалений

Просмотреть файл

@ -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