1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/soap/test_basetype.rb, test/soap/marshal/test_marshal.rb

test/xsd/test_xsd.rb: use "(-1.0 / (1.0 / 0.0))" instead of "-0.0"
          to express -0.0.  [ruby-talk:88786]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nahi 2003-12-24 14:53:17 +00:00
parent 8b279c0ddb
commit dc7549c0b0
4 changed files with 15 additions and 5 deletions

View file

@ -1,3 +1,9 @@
Wed Dec 24 23:48:04 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
* test/soap/test_basetype.rb, test/soap/marshal/test_marshal.rb
test/xsd/test_xsd.rb: use "(-1.0 / (1.0 / 0.0))" instead of "-0.0"
to express -0.0. [ruby-talk:88786]
Wed Dec 24 23:29:30 2003 Tanaka Akira <akr@m17n.org>
* lib/tsort.rb (test_orphaned_break): removed.

View file

@ -205,7 +205,7 @@ module MarshalTestLib
marshal_equal(1.0/0.0)
marshal_equal(-1.0/0.0)
marshal_equal(0.0/0.0) {|o| o.nan?}
marshal_equal(-0.0) {|o| 1.0/o}
marshal_equal(-1.0 / (1.0 / 0.0)) {|o| 1.0/o} # -0.0
end
def test_float_ivar

View file

@ -6,6 +6,8 @@ module SOAP
class TestSOAP < Test::Unit::TestCase
NegativeZero = (-1.0 / (1.0 / 0.0))
def setup
# Nothing to do.
end
@ -189,7 +191,7 @@ class TestSOAP < Test::Unit::TestCase
end
assert_equal("+0", SOAP::SOAPFloat.new(+0.0).to_s)
assert_equal("-0", SOAP::SOAPFloat.new(-0.0).to_s)
assert_equal("-0", SOAP::SOAPFloat.new(NegativeZero).to_s)
assert(SOAP::SOAPFloat.new(0.0/0.0).data.nan?)
assert_equal("INF", SOAP::SOAPFloat.new(1.0/0.0).to_s)
assert_equal(1, SOAP::SOAPFloat.new(1.0/0.0).data.infinite?)
@ -254,7 +256,7 @@ class TestSOAP < Test::Unit::TestCase
end
assert_equal("+0", SOAP::SOAPFloat.new(+0.0).to_s)
assert_equal("-0", SOAP::SOAPFloat.new(-0.0).to_s)
assert_equal("-0", SOAP::SOAPFloat.new(NegativeZero).to_s)
assert_equal("NaN", SOAP::SOAPDouble.new(0.0/0.0).to_s)
assert(SOAP::SOAPDouble.new(0.0/0.0).data.nan?)
assert_equal("INF", SOAP::SOAPDouble.new(1.0/0.0).to_s)

View file

@ -6,6 +6,8 @@ module XSD
class TestXSD < Test::Unit::TestCase
NegativeZero = (-1.0 / (1.0 / 0.0))
def setup
end
@ -222,7 +224,7 @@ class TestXSD < Test::Unit::TestCase
end
assert_equal("+0", XSD::XSDFloat.new(+0.0).to_s)
assert_equal("-0", XSD::XSDFloat.new(-0.0).to_s)
assert_equal("-0", XSD::XSDFloat.new(NegativeZero).to_s)
assert(XSD::XSDFloat.new(0.0/0.0).data.nan?)
assert_equal("INF", XSD::XSDFloat.new(1.0/0.0).to_s)
assert_equal(1, XSD::XSDFloat.new(1.0/0.0).data.infinite?)
@ -287,7 +289,7 @@ class TestXSD < Test::Unit::TestCase
end
assert_equal("+0", XSD::XSDFloat.new(+0.0).to_s)
assert_equal("-0", XSD::XSDFloat.new(-0.0).to_s)
assert_equal("-0", XSD::XSDFloat.new(NegativeZero).to_s)
assert_equal("NaN", XSD::XSDDouble.new(0.0/0.0).to_s)
assert(XSD::XSDDouble.new(0.0/0.0).data.nan?)
assert_equal("INF", XSD::XSDDouble.new(1.0/0.0).to_s)