(t *testing.T)
| 344 | } |
| 345 | |
| 346 | func TestString(t *testing.T) { |
| 347 | dag := newTestDAG() |
| 348 | str := dag.String() |
| 349 | expectedOrder := []string{"|", "4", "5", "1", "10", "12", "11", "9", "6", "0", "3", "2", "7", "8"} |
| 350 | expectedStr := strings.Join(expectedOrder, "->") |
| 351 | if str != expectedStr { |
| 352 | t.Errorf("dag string error, expected: %s, actual: %s", expectedStr, str) |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | func less(v1, v2 Vertex) bool { |
| 357 | val1, _ := v1.(int) |
nothing calls this directly
no test coverage detected
searching dependent graphs…