@@ -156,8 +156,30 @@ defmodule GraphTest do
156156 assert Map . has_key? ( g . edge_index [ :baz ] , g . vertex_identifier . ( :a ) )
157157 end
158158
159- test "traversal using indexed keys" do
160- end
159+ # test "BFS traversal using multigraph partitions" do
160+ # graph =
161+ # Graph.new(multigraph: true)
162+ # |> Graph.add_edges([
163+ # {:a, :b, label: :foo},
164+ # {:a, :b, label: :bar},
165+ # {:b, :c, weight: 3},
166+ # {:b, :a, label: {:complex, :label}}
167+ # ])
168+
169+ # assert Graph.bfs(graph, :a) == [:a, :b, :c]
170+ # end
171+
172+ # test "DFS traversal using multigraph partitions" do
173+ # end
174+
175+ # test "Dijkstra traversal using multigraph partitions" do
176+ # end
177+
178+ # test "A* traversal using multigraph partitions" do
179+ # end
180+
181+ # test "Bellman-Ford traversal using multigraph partitions" do
182+ # end
161183 end
162184
163185 describe "edge properties" do
@@ -190,6 +212,19 @@ defmodule GraphTest do
190212 % Edge { v1: :a , v2: :b , label: :foo , properties: % { potato: :ham } }
191213 ] = Graph . out_edges ( g , :a )
192214 end
215+
216+ test "adding edge struct with properties" do
217+ g =
218+ Graph . new ( )
219+
220+ edge = Edge . new ( :a , :b , properties: % { foo: :bar } )
221+
222+ g = Graph . add_edge ( g , edge )
223+
224+ assert [
225+ % Edge { v1: :a , v2: :b , properties: % { foo: :bar } }
226+ ] = Graph . out_edges ( g , :a )
227+ end
193228 end
194229
195230 test "delete vertex" do
0 commit comments