9
class Node; include SOAP::Marshallable
10
attr_reader :first, :second, :str
12
def initialize(*init_next)
14
@second = init_next[1]
18
class TestDigraph < Test::Unit::TestCase
23
@n7 = Node.new(@n81, @n82)
26
@n5 = Node.new(@n61, @n62)
29
@n3 = Node.new(@n41, @n42)
32
@n1 = Node.new(@n21, @n22)
36
f = File.open("digraph_marshalled_string.soap", "wb")
37
SOAP::Marshal.dump(@n1, f)
39
f = File.open("digraph_marshalled_string.soap")
42
newnode = SOAP::Marshal.unmarshal(str)
43
assert_equal(newnode.first.first.__id__, newnode.second.first.__id__)
44
assert_equal(newnode.first.first.first.first.__id__, newnode.second.first.second.first.__id__)
48
if File.exist?("digraph_marshalled_string.soap")
49
File.unlink("digraph_marshalled_string.soap")