Sha256: dd2d17de14d93a995fd5eadeeb67df3b2e9d5a149e7b525c9860eb676b34f2bf

Contents?: true

Size: 732 Bytes

Versions: 33

Compression:

Stored size: 732 Bytes

Contents

require 'test/unit'
require 'soap/marshal'


module SOAP
module Marshal


Foo1 = ::Struct.new("Foo1", :m)
Foo2 = ::Struct.new(:m)
class Foo3
  attr_accessor :m
end

class TestStruct < Test::Unit::TestCase
  def test_foo1
    org = Foo1.new
    org.m = org
    obj = convert(org)
    assert_equal(Foo1, obj.class)
    assert_equal(obj.m, obj)
  end

  def test_foo2
    org = Foo2.new
    org.m = org
    obj = convert(org)
    assert_equal(Foo2, obj.class)
    assert_equal(obj.m, obj)
  end

  def test_foo3
    org = Foo3.new
    org.m = org
    obj = convert(org)
    assert_equal(Foo3, obj.class)
    assert_equal(obj.m, obj)
  end

  def convert(obj)
    SOAP::Marshal.unmarshal(SOAP::Marshal.marshal(obj))
  end
end


end
end

Version data entries

33 entries across 33 versions & 13 rubygems

Version Path
mumboe-soap4r-1.6.0.pre.beta test/soap/marshal/test_struct.rb
DefV-soap4r-1.5.8.2 test/soap/marshal/test_struct.rb
mumboe-soap4r-1.5.8.7 test/soap/marshal/test_struct.rb
teo-soap4r-1.5.9b test/soap/marshal/test_struct.rb
mumboe-soap4r-1.5.8.6 test/soap/marshal/test_struct.rb
soap4r-spox-1.6.0 test/soap/marshal/test_struct.rb
soap4r-r19-1.5.9 test/soap/marshal/test_struct.rb
mumboe-soap4r-1.5.8.5 test/soap/marshal/test_struct.rb
soap4r-ruby1.9-2.0.5 test/soap/marshal/test_struct.rb
soap4r-sgonyea-1.6.0 test/soap/marshal/test_struct.rb
soap4r-straightjacket-1.5.9 test/soap/marshal/test_struct.rb
soap4r-straightjacket-1.5.8 test/soap/marshal/test_struct.rb
soap4r-ruby1.9-2.0.3 test/soap/marshal/test_struct.rb
soap4r-ruby1.9-2.0.2 test/soap/marshal/test_struct.rb
soap4r-ruby1.9-2.0.1 test/soap/marshal/test_struct.rb
mumboe-soap4r-1.5.8.4 test/soap/marshal/test_struct.rb
soap4r-ruby1.9-2.0.0 test/soap/marshal/test_struct.rb
hands-soap4r-1.5.8.4 test/soap/marshal/test_struct.rb
soap4r-ruby1.9-1.0.0 test/soap/marshal/test_struct.rb
snaury-soap4r-1.5.8.1 test/soap/marshal/test_struct.rb