Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Changeset 1136

Show
Ignore:
Timestamp:
12/25/03 11:32:21 (5 years ago)
Author:
nahi
Message:

* use "(-1.0 / (1.0 / 0.0))" instead of "-0.0".

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/test/interopR2/client.rb

    r925 r1136  
    66require 'base' 
    77require 'interopResultBase' 
     8#XSD::Charset.encoding = 'EUC' 
    89 
    910class Float 
     
    7475  include SOAPBuildersInterop 
    7576 
     77  NegativeZero = (-1.0 / (1.0 / 0.0)) 
     78 
    7679  class << self 
    7780    include SOAP 
     
    450453  def test_echoFloat_special_values_negative_0 
    451454    log_test 
    452     arg = -0.0 
     455    arg = NegativeZero 
    453456    var = drv.echoFloat(SOAPFloat.new(arg)) 
    454457    assert_equal(arg, var) 
  • trunk/test/interopR2/clientBase.rb

    r952 r1136  
    626626  dumpTitle(title) 
    627627  begin 
    628     arg = -0.0 
     628    arg = (-1.0 / (1.0 / 0.0)) 
    629629    var = drv.echoFloat(SOAPFloat.new(arg)) 
    630630    dumpNormal(title, arg, var) 
  • trunk/test/soap/marshal/test_marshal.rb

    r1030 r1136  
    88 
    99module MarshalTestLib 
     10  NegativeZero = (-1.0 / (1.0 / 0.0)) 
    1011 
    1112  module Mod1; end 
     
    206207    marshal_equal(-1.0/0.0) 
    207208    marshal_equal(0.0/0.0) {|o| o.nan?} 
    208     marshal_equal(-0.0) {|o| 1.0/o} 
     209    marshal_equal(NegativeZero) {|o| 1.0/o} 
    209210  end 
    210211 
  • trunk/test/soap/test_basetype.rb

    r1061 r1136  
    77 
    88class TestSOAP < Test::Unit::TestCase 
     9  NegativeZero = (-1.0 / (1.0 / 0.0)) 
     10 
    911  def setup 
    1012    # Nothing to do. 
     
    190192 
    191193    assert_equal("+0", SOAP::SOAPFloat.new(+0.0).to_s) 
    192     assert_equal("-0", SOAP::SOAPFloat.new(-0.0).to_s) 
     194    assert_equal("-0", SOAP::SOAPFloat.new(NegativeZero).to_s) 
    193195    assert(SOAP::SOAPFloat.new(0.0/0.0).data.nan?) 
    194196    assert_equal("INF", SOAP::SOAPFloat.new(1.0/0.0).to_s) 
     
    255257 
    256258    assert_equal("+0", SOAP::SOAPFloat.new(+0.0).to_s) 
    257     assert_equal("-0", SOAP::SOAPFloat.new(-0.0).to_s) 
     259    assert_equal("-0", SOAP::SOAPFloat.new(NegativeZero).to_s) 
    258260    assert_equal("NaN", SOAP::SOAPDouble.new(0.0/0.0).to_s) 
    259261    assert(SOAP::SOAPDouble.new(0.0/0.0).data.nan?) 
  • trunk/test/xsd/test_xsd.rb

    r1061 r1136  
    77 
    88class TestXSD < Test::Unit::TestCase 
     9  NegativeZero = (-1.0 / (1.0 / 0.0)) 
     10 
    911  def setup 
    1012  end 
     
    223225 
    224226    assert_equal("+0", XSD::XSDFloat.new(+0.0).to_s) 
    225     assert_equal("-0", XSD::XSDFloat.new(-0.0).to_s) 
     227    assert_equal("-0", XSD::XSDFloat.new(NegativeZero).to_s) 
    226228    assert(XSD::XSDFloat.new(0.0/0.0).data.nan?) 
    227229    assert_equal("INF", XSD::XSDFloat.new(1.0/0.0).to_s) 
     
    288290 
    289291    assert_equal("+0", XSD::XSDFloat.new(+0.0).to_s) 
    290     assert_equal("-0", XSD::XSDFloat.new(-0.0).to_s) 
     292    assert_equal("-0", XSD::XSDFloat.new(NegativeZero).to_s) 
    291293    assert_equal("NaN", XSD::XSDDouble.new(0.0/0.0).to_s) 
    292294    assert(XSD::XSDDouble.new(0.0/0.0).data.nan?)