digraph: fix flaky test
This commit is contained in:
parent
c493d60358
commit
ae07b26908
|
@ -33,11 +33,15 @@ d -> e`)
|
||||||
t.Fatalf("bad: %v", sccs)
|
t.Fatalf("bad: %v", sccs)
|
||||||
}
|
}
|
||||||
|
|
||||||
if cycle[0].(*BasicNode).Name != "c" {
|
cycleNodes := make([]string, len(cycle))
|
||||||
t.Fatalf("bad: %v", cycle)
|
for i, c := range cycle {
|
||||||
|
cycleNodes[i] = c.(*BasicNode).Name
|
||||||
}
|
}
|
||||||
if cycle[1].(*BasicNode).Name != "b" {
|
sort.Strings(cycleNodes)
|
||||||
t.Fatalf("bad: %v", cycle)
|
|
||||||
|
expected := []string{"b", "c"}
|
||||||
|
if !reflect.DeepEqual(cycleNodes, expected) {
|
||||||
|
t.Fatalf("bad: %#v", cycleNodes)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue