summaryrefslogtreecommitdiff
path: root/test/xsd
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-24 14:53:17 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-24 14:53:17 +0000
commitdc7549c0b0a54262b5e7939ee88a75557ef4c953 (patch)
tree6242a7dfb94fd3e3baf4f596cddfd896f54253d8 /test/xsd
parent8b279c0ddbcf417230b7e3fa08ca020bb8f309ad (diff)
* 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
Diffstat (limited to 'test/xsd')
-rw-r--r--test/xsd/test_xsd.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/xsd/test_xsd.rb b/test/xsd/test_xsd.rb
index 9b3a7f0f1f..db38aee7ca 100644
--- a/test/xsd/test_xsd.rb
+++ b/test/xsd/test_xsd.rb
@@ -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)