test/yargi/edge_set_test.rb in yargi-0.1.2 vs test/yargi/edge_set_test.rb in yargi-0.2.0
- old
+ new
@@ -8,26 +8,26 @@
@graph = Yargi::Digraph.new
@s1, @s2 = @graph.add_n_vertices(2)
@graph.connect(@s1, @s2, {:label => 'a'})
@graph.connect(@s2, @s1, {:label => 'b'})
end
-
+
def test_source=
@graph.edges.source=@s1
assert @graph.edges.length==2
assert @s2.out_edges.empty?
assert @s2.in_edges.length==1
assert @s1.out_edges.length==2
assert @s1.in_edges.length==1
end
-
+
def test_target=
@graph.edges.target=@s1
assert @graph.edges.length==2
assert @s2.in_edges.empty?
assert @s2.out_edges.length==1
assert @s1.out_edges.length==1
assert @s1.in_edges.length==2
end
-
+
end
end
\ No newline at end of file