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

Function atom

analysis/validation_test.go:50–60  ·  view source on GitHub ↗
(str string)

Source from the content-addressed store, hash-verified

48}
49
50func atom(str string) ast.Atom {
51 term, err := parse.Term(str)
52 if err != nil {
53 panic(fmt.Errorf("bad syntax in test case: %s got %w", str, err))
54 }
55 atom, ok := term.(ast.Atom)
56 if !ok {
57 panic(fmt.Errorf("not an atom test case: %v", term))
58 }
59 return atom
60}
61
62func makeDecl(t *testing.T, a ast.Atom, descr []ast.Atom, boundDecls []ast.BoundDecl, incl *ast.InclusionConstraint) ast.Decl {
63 t.Helper()

Callers 15

TestCheckRulePositiveFunction · 0.70
TestCheckRuleBindsByDeclFunction · 0.70
TestCheckRuleNegativeFunction · 0.70
TestAnalyzePositiveFunction · 0.70
TestAnalyzeNegativeFunction · 0.70
TestBoundsAnalyzerFunction · 0.70
TestCollectNamesFunction · 0.70
TestDeferredFunction · 0.70

Calls 1

TermFunction · 0.92

Tested by

no test coverage detected