Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Commit

Permalink
Ensure bidirectional edges dereference to the same object
Browse files Browse the repository at this point in the history
  • Loading branch information
floriandejonckheere committed Apr 1, 2024
1 parent 189ac01 commit daf671c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/mosaik/graph/graph_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@

expect(graph.find_vertex("vertex1").edges.keys).to eq ["vertex2"]
expect(graph.find_vertex("vertex2").edges.keys).to eq ["vertex1"]

expect(graph.find_vertex("vertex1").edges["vertex2"].object_id).to eq graph.find_vertex("vertex2").edges["vertex1"].object_id
end

it "sets the attributes" do
Expand All @@ -92,6 +94,8 @@

expect(graph.find_vertex("vertex1").edges.keys).to eq ["vertex2"]
expect(graph.find_vertex("vertex2").edges.keys).to eq ["vertex1"]

expect(graph.find_vertex("vertex1").edges["vertex2"].object_id).to eq graph.find_vertex("vertex2").edges["vertex1"].object_id
end

it "merges the attributes" do
Expand Down

0 comments on commit daf671c

Please sign in to comment.