MCPcopy Create free account
hub / github.com/encodeous/nylon / TestParseGraph_SimpleGraph

Function TestParseGraph_SimpleGraph

state/config_test.go:10–24  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestParseGraph_SimpleGraph(t *testing.T) {
11 nodes := []string{"1", "2", "3", "4", "5"}
12 input := `1, 2
133, 4
141,3,5`
15 pairs, err := ParseGraph(strings.Split(input, "\n"), nodes)
16 assert.NoError(t, err)
17 assert.ElementsMatch(t, pairs, []Pair[NodeId, NodeId]{
18 {"1", "2"},
19 {"3", "4"},
20 {"1", "3"},
21 {"3", "5"},
22 {"1", "5"},
23 })
24}
25
26func TestParseGraph_Groups(t *testing.T) {
27 nodes := []string{"1", "2", "3", "4", "5", "6", "7"}

Callers

nothing calls this directly

Calls 1

ParseGraphFunction · 0.85

Tested by

no test coverage detected