MCPcopy
hub / github.com/docker/compose / isVertexEqual

Function isVertexEqual

pkg/compose/dependencies_test.go:326–343  ·  view source on GitHub ↗
(a, b Vertex)

Source from the content-addressed store, hash-verified

324}
325
326func isVertexEqual(a, b Vertex) bool {
327 childrenEquality := true
328 for c := range a.Children {
329 if _, ok := b.Children[c]; !ok {
330 childrenEquality = false
331 }
332 }
333 parentEquality := true
334 for p := range a.Parents {
335 if _, ok := b.Parents[p]; !ok {
336 parentEquality = false
337 }
338 }
339 return a.Key == b.Key &&
340 a.Service == b.Service &&
341 childrenEquality &&
342 parentEquality
343}
344
345func TestWith_RootNodesAndUp(t *testing.T) {
346 graph := &Graph{

Callers 2

TestBuildGraphFunction · 0.85
TestBuildGraphDependsOnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected