diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/soap/calc/test_calc2.rb | 1 | ||||
-rw-r--r-- | test/soap/calc/test_calc_cgi.rb | 1 | ||||
-rw-r--r-- | test/soap/marshal/test_marshal.rb | 3 | ||||
-rw-r--r-- | test/soap/test_basetype.rb | 40 | ||||
-rw-r--r-- | test/soap/test_streamhandler.rb | 13 | ||||
-rw-r--r-- | test/xsd/test_xsd.rb | 40 |
6 files changed, 54 insertions, 44 deletions
diff --git a/test/soap/calc/test_calc2.rb b/test/soap/calc/test_calc2.rb index b7fee71526..c066d374fb 100644 --- a/test/soap/calc/test_calc2.rb +++ b/test/soap/calc/test_calc2.rb @@ -30,6 +30,7 @@ class TestCalc2 < Test::Unit::TestCase end @endpoint = "http://localhost:#{Port}/" @var = SOAP::RPC::Driver.new(@endpoint, 'http://tempuri.org/calcService') + @var.wiredump_dev = STDERR if $DEBUG @var.add_method('set', 'newValue') @var.add_method('get') @var.add_method_as('+', 'add', 'rhs') diff --git a/test/soap/calc/test_calc_cgi.rb b/test/soap/calc/test_calc_cgi.rb index 523379f302..d1655b0b01 100644 --- a/test/soap/calc/test_calc_cgi.rb +++ b/test/soap/calc/test_calc_cgi.rb @@ -44,6 +44,7 @@ class TestCalcCGI < Test::Unit::TestCase end @endpoint = "http://localhost:#{Port}/server.cgi" @calc = SOAP::RPC::Driver.new(@endpoint, 'http://tempuri.org/calcService') + @calc.wiredump_dev = STDERR if $DEBUG @calc.add_method('add', 'lhs', 'rhs') @calc.add_method('sub', 'lhs', 'rhs') @calc.add_method('multi', 'lhs', 'rhs') diff --git a/test/soap/marshal/test_marshal.rb b/test/soap/marshal/test_marshal.rb index d530c06c24..1bbaa91a08 100644 --- a/test/soap/marshal/test_marshal.rb +++ b/test/soap/marshal/test_marshal.rb @@ -7,6 +7,7 @@ module Marshal module MarshalTestLib + NegativeZero = (-1.0 / (1.0 / 0.0)) module Mod1; end module Mod2; end @@ -205,7 +206,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(-1.0 / (1.0 / 0.0)) {|o| 1.0/o} # -0.0 + marshal_equal(NegativeZero) {|o| 1.0/o} end def test_float_ivar diff --git a/test/soap/test_basetype.rb b/test/soap/test_basetype.rb index 7a77946c2c..afd550f996 100644 --- a/test/soap/test_basetype.rb +++ b/test/soap/test_basetype.rb @@ -156,8 +156,8 @@ class TestSOAP < Test::Unit::TestCase targets = [ 3.14159265358979, 12.34e36, - 1.4e-45, - -1.4e-45, + 1.402e-45, + -1.402e-45, ] targets.each do |f| assert_equal(f, SOAP::SOAPFloat.new(f).data) @@ -166,8 +166,8 @@ class TestSOAP < Test::Unit::TestCase targets = [ "+3.141592654", "+1.234e+37", - "+1.4e-45", - "-1.4e-45", + "+1.402e-45", + "-1.402e-45", ] targets.each do |f| assert_equal(f, SOAP::SOAPFloat.new(f).to_s) @@ -178,13 +178,13 @@ class TestSOAP < Test::Unit::TestCase [-2, "-2"], # ditto [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"], + [1.402e-45, "+1.402e-45"], + [-1.402e-45, "-1.402e-45"], + ["1.402e", "+1.402"], ["12.34E36", "+1.234e+37"], - ["1.4E-45", "+1.4e-45"], - ["-1.4E-45", "-1.4e-45"], - ["1.4E", "+1.4"], + ["1.402E-45", "+1.402e-45"], + ["-1.402E-45", "-1.402e-45"], + ["1.402E", "+1.402"], ] targets.each do |f, str| assert_equal(str, SOAP::SOAPFloat.new(f).to_s) @@ -221,8 +221,8 @@ class TestSOAP < Test::Unit::TestCase targets = [ 3.14159265358979, 12.34e36, - 1.4e-45, - -1.4e-45, + 1.402e-45, + -1.402e-45, ] targets.each do |f| assert_equal(f, SOAP::SOAPDouble.new(f).data) @@ -231,8 +231,8 @@ class TestSOAP < Test::Unit::TestCase targets = [ "+3.14159265358979", "+1.234e+37", - "+1.4e-45", - "-1.4e-45", + "+1.402e-45", + "-1.402e-45", ] targets.each do |f| assert_equal(f, SOAP::SOAPDouble.new(f).to_s) @@ -243,13 +243,13 @@ class TestSOAP < Test::Unit::TestCase [-2, "-2"], # ditto. [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"], + [1.402e-45, "+1.402e-45"], + [-1.402e-45, "-1.402e-45"], + ["1.402e", "+1.402"], ["12.34E36", "+1.234e+37"], - ["1.4E-45", "+1.4e-45"], - ["-1.4E-45", "-1.4e-45"], - ["1.4E", "+1.4"], + ["1.402E-45", "+1.402e-45"], + ["-1.402E-45", "-1.402e-45"], + ["1.402E", "+1.402"], ] targets.each do |f, str| assert_equal(str, SOAP::SOAPDouble.new(f).to_s) diff --git a/test/soap/test_streamhandler.rb b/test/soap/test_streamhandler.rb index d38b84ed97..e5b578d7a6 100644 --- a/test/soap/test_streamhandler.rb +++ b/test/soap/test_streamhandler.rb @@ -142,9 +142,16 @@ __EOX__ end def test_basic_auth - # soap4r + basic_auth is not officially supported in ruby/1.8.1 even though - # soap4r + basic_auth + http-access2 should run fine. - return + unless Object.const_defined?('HTTPAccess2') + STDERR.puts("basic_auth is not supported under soap4r + net/http for now.") + return + end + str = "" + @client.wiredump_dev = str + @client.options["protocol.http.basic_auth"] << [@url, "foo", "bar"] + assert_nil(@client.do_server_proc) + r, h = parse_req_header(str) + assert_equal("Basic Zm9vOmJhcg==", h["authorization"]) end def test_proxy diff --git a/test/xsd/test_xsd.rb b/test/xsd/test_xsd.rb index db38aee7ca..ce1b263625 100644 --- a/test/xsd/test_xsd.rb +++ b/test/xsd/test_xsd.rb @@ -189,8 +189,8 @@ class TestXSD < Test::Unit::TestCase targets = [ 3.14159265358979, 12.34e36, - 1.4e-45, - -1.4e-45, + 1.402e-45, + -1.402e-45, ] targets.each do |f| assert_equal(f, XSD::XSDFloat.new(f).data) @@ -199,8 +199,8 @@ class TestXSD < Test::Unit::TestCase targets = [ "+3.141592654", "+1.234e+37", - "+1.4e-45", - "-1.4e-45", + "+1.402e-45", + "-1.402e-45", ] targets.each do |f| assert_equal(f, XSD::XSDFloat.new(f).to_s) @@ -211,13 +211,13 @@ class TestXSD < Test::Unit::TestCase [-2, "-2"], # ditto [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"], + [1.402e-45, "+1.402e-45"], + [-1.402e-45, "-1.402e-45"], + ["1.402e", "+1.402"], ["12.34E36", "+1.234e+37"], - ["1.4E-45", "+1.4e-45"], - ["-1.4E-45", "-1.4e-45"], - ["1.4E", "+1.4"], + ["1.402E-45", "+1.402e-45"], + ["-1.402E-45", "-1.402e-45"], + ["1.402E", "+1.402"], ] targets.each do |f, str| assert_equal(str, XSD::XSDFloat.new(f).to_s) @@ -254,8 +254,8 @@ class TestXSD < Test::Unit::TestCase targets = [ 3.14159265358979, 12.34e36, - 1.4e-45, - -1.4e-45, + 1.402e-45, + -1.402e-45, ] targets.each do |f| assert_equal(f, XSD::XSDDouble.new(f).data) @@ -264,8 +264,8 @@ class TestXSD < Test::Unit::TestCase targets = [ "+3.14159265358979", "+1.234e+37", - "+1.4e-45", - "-1.4e-45", + "+1.402e-45", + "-1.402e-45", ] targets.each do |f| assert_equal(f, XSD::XSDDouble.new(f).to_s) @@ -276,13 +276,13 @@ class TestXSD < Test::Unit::TestCase [-2, "-2"], # ditto. [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"], + [1.402e-45, "+1.402e-45"], + [-1.402e-45, "-1.402e-45"], + ["1.402e", "+1.402"], ["12.34E36", "+1.234e+37"], - ["1.4E-45", "+1.4e-45"], - ["-1.4E-45", "-1.4e-45"], - ["1.4E", "+1.4"], + ["1.402E-45", "+1.402e-45"], + ["-1.402E-45", "-1.402e-45"], + ["1.402E", "+1.402"], ] targets.each do |f, str| assert_equal(str, XSD::XSDDouble.new(f).to_s) |