summaryrefslogtreecommitdiffstats
path: root/test/xsd
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-01 15:29:43 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-01 15:29:43 +0000
commit7638241523e17df24cc72d216837e437e2fb0493 (patch)
tree35f0a5b4fb6324e3695cef7149036b6fcd0e3d3e /test/xsd
parent72264f097b5787e6d31f1aa4b29f1fc958ede257 (diff)
downloadruby-7638241523e17df24cc72d216837e437e2fb0493.tar.gz
ruby-7638241523e17df24cc72d216837e437e2fb0493.tar.xz
ruby-7638241523e17df24cc72d216837e437e2fb0493.zip
* test/logger/test_logger.rb: unlinking file before close causes problem under
win32 box. * lib/xsd/datatypes.rb(XSDFloat, XSDDouble): add +/- sign explicitly when stringified and embedded into XML instance. Ruby's sprintf may format -0.0 as "0.0" (no minus sign) depending on underlying C sprintf implementation. * test/xsd/test_xsd.rb, test/soap/test_basetype.rb: follow above change. * test/soap/calc/*: give httpd config param "CGIInterpreter". "/usr/bin/env ruby" thing does not work under non-Unix boxes. * ChangeLog: corrected wrong DoW of my log entries... git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/xsd')
-rw-r--r--test/xsd/test_xsd.rb48
1 files changed, 24 insertions, 24 deletions
diff --git a/test/xsd/test_xsd.rb b/test/xsd/test_xsd.rb
index 818ad5198..88191bb7f 100644
--- a/test/xsd/test_xsd.rb
+++ b/test/xsd/test_xsd.rb
@@ -195,9 +195,9 @@ class TestXSD < Test::Unit::TestCase
end
targets = [
- "3.141592654",
- "1.234e+37",
- "1.4e-45",
+ "+3.141592654",
+ "+1.234e+37",
+ "+1.4e-45",
"-1.4e-45",
]
targets.each do |f|
@@ -205,23 +205,23 @@ class TestXSD < Test::Unit::TestCase
end
targets = [
- [3, "3"], # should be 3.0?
+ [3, "+3"], # should be 3.0?
[-2, "-2"], # ditto
- [3.14159265358979, "3.141592654"],
- [12.34e36, "1.234e+37"],
- [1.4e-45, "1.4e-45"],
+ [3.14159265358979, "+3.141592654"],
+ [12.34e36, "+1.234e+37"],
+ [1.4e-45, "+1.4e-45"],
[-1.4e-45, "-1.4e-45"],
- ["1.4e", "1.4"],
- ["12.34E36", "1.234e+37"],
- ["1.4E-45", "1.4e-45"],
+ ["1.4e", "+1.4"],
+ ["12.34E36", "+1.234e+37"],
+ ["1.4E-45", "+1.4e-45"],
["-1.4E-45", "-1.4e-45"],
- ["1.4E", "1.4"],
+ ["1.4E", "+1.4"],
]
targets.each do |f, str|
assert_equal(str, XSD::XSDFloat.new(f).to_s)
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(-0.0).to_s)
assert(XSD::XSDFloat.new(0.0/0.0).data.nan?)
assert_equal("INF", XSD::XSDFloat.new(1.0/0.0).to_s)
@@ -260,9 +260,9 @@ class TestXSD < Test::Unit::TestCase
end
targets = [
- "3.14159265358979",
- "1.234e+37",
- "1.4e-45",
+ "+3.14159265358979",
+ "+1.234e+37",
+ "+1.4e-45",
"-1.4e-45",
]
targets.each do |f|
@@ -270,23 +270,23 @@ class TestXSD < Test::Unit::TestCase
end
targets = [
- [3, "3"], # should be 3.0?
+ [3, "+3"], # should be 3.0?
[-2, "-2"], # ditto.
- [3.14159265358979, "3.14159265358979"],
- [12.34e36, "1.234e+37"],
- [1.4e-45, "1.4e-45"],
+ [3.14159265358979, "+3.14159265358979"],
+ [12.34e36, "+1.234e+37"],
+ [1.4e-45, "+1.4e-45"],
[-1.4e-45, "-1.4e-45"],
- ["1.4e", "1.4"],
- ["12.34E36", "1.234e+37"],
- ["1.4E-45", "1.4e-45"],
+ ["1.4e", "+1.4"],
+ ["12.34E36", "+1.234e+37"],
+ ["1.4E-45", "+1.4e-45"],
["-1.4E-45", "-1.4e-45"],
- ["1.4E", "1.4"],
+ ["1.4E", "+1.4"],
]
targets.each do |f, str|
assert_equal(str, XSD::XSDDouble.new(f).to_s)
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(-0.0).to_s)
assert_equal("NaN", XSD::XSDDouble.new(0.0/0.0).to_s)
assert(XSD::XSDDouble.new(0.0/0.0).data.nan?)