test suite test graph
test case basic test()
the graph • add edge("foo", "bar", "edge")
assert !foo • is empty
assert foo • is not empty
assert foo • size == 1
assert foo elements • first == "bar"
test case cycle test()
the graph • add edge("A", "B", "A-B")
the graph • add edge("A", "C", "A-C")
the graph • add edge("C", "D", "C-D")
assert the graph • introduces cycle("A", "A")
assert !the graph • introduces cycle("A", "B")
assert the graph • introduces cycle("B", "A")
assert !the graph • introduces cycle("B", "C")
assert the graph • introduces cycle("C", "A")
assert the graph • introduces cycle("D", "A")
assert the graph • introduces cycle("D", "C")
assert !the graph • introduces cycle("D", "B")