(t *testing.T)
| 24 | } |
| 25 | |
| 26 | func TestParseGraph_Groups(t *testing.T) { |
| 27 | nodes := []string{"1", "2", "3", "4", "5", "6", "7"} |
| 28 | input := `a = 1,2 |
| 29 | b=3,,,4 |
| 30 | c=5,6 |
| 31 | d=a,b |
| 32 | d,d |
| 33 | 7,d` |
| 34 | pairs, err := ParseGraph(strings.Split(input, "\n"), nodes) |
| 35 | assert.NoError(t, err) |
| 36 | assert.ElementsMatch(t, pairs, []Pair[NodeId, NodeId]{ |
| 37 | // d,d |
| 38 | {"1", "2"}, |
| 39 | {"1", "3"}, |
| 40 | {"1", "4"}, |
| 41 | {"2", "3"}, |
| 42 | {"2", "4"}, |
| 43 | {"3", "4"}, |
| 44 | // 7,d |
| 45 | {"1", "7"}, |
| 46 | {"2", "7"}, |
| 47 | {"3", "7"}, |
| 48 | {"4", "7"}, |
| 49 | }) |
| 50 | } |
| 51 | |
| 52 | func TestParseGraph_Cycle(t *testing.T) { |
| 53 | nodes := []string{} |
nothing calls this directly
no test coverage detected