MCPcopy
hub / github.com/google/mangle / unionFindFromMap

Function unionFindFromMap

unionfind/unionfind_test.go:113–121  ·  view source on GitHub ↗

unionFindFromMap turns the given map into a UnionFind instance.

(base map[ast.Variable]ast.BaseTerm)

Source from the content-addressed store, hash-verified

111
112// unionFindFromMap turns the given map into a UnionFind instance.
113func unionFindFromMap(base map[ast.Variable]ast.BaseTerm) (UnionFind, error) {
114 var vars []ast.BaseTerm
115 var terms []ast.BaseTerm
116 for v, c := range base {
117 vars = append(vars, v)
118 terms = append(terms, c)
119 }
120 return UnifyTerms(vars, terms)
121}
122
123func TestUnifyExtendPositive(t *testing.T) {
124 tests := []struct {

Callers 2

TestUnifyExtendPositiveFunction · 0.85
TestUnifyExtendNegativeFunction · 0.85

Calls 1

UnifyTermsFunction · 0.85

Tested by

no test coverage detected