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

Function mustDecl

analysis/declcheck_test.go:36–42  ·  view source on GitHub ↗
(descrAtoms []ast.Atom, boundDecls []ast.BoundDecl, constraint *ast.InclusionConstraint)

Source from the content-addressed store, hash-verified

34)
35
36func mustDecl(descrAtoms []ast.Atom, boundDecls []ast.BoundDecl, constraint *ast.InclusionConstraint) ast.Decl {
37 decl, err := ast.NewDecl(declAtom, descrAtoms, boundDecls, constraint)
38 if err != nil {
39 panic(fmt.Errorf("bad test data: %v %v %v %v", declAtom, descrAtoms, boundDecls, constraint))
40 }
41 return decl
42}
43
44func checkBoundDecl(boundDecl ast.BoundDecl) []error {
45 return newDeclChecker(mustDecl([]ast.Atom{docAtomOne, argAtomBar, argAtomBaz}, []ast.BoundDecl{boundDecl}, nil)).check()

Callers 3

checkBoundDeclFunction · 0.85

Calls 1

NewDeclFunction · 0.92

Tested by

no test coverage detected