diff options
Diffstat (limited to 'test/soap/test_basetype.rb')
-rw-r--r-- | test/soap/test_basetype.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/soap/test_basetype.rb b/test/soap/test_basetype.rb index a00f0f549c..7a77946c2c 100644 --- a/test/soap/test_basetype.rb +++ b/test/soap/test_basetype.rb @@ -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) |