MCPcopy
hub / github.com/google/mtail / TestCheckTypeExpressions

Function TestCheckTypeExpressions

internal/runtime/compiler/checker/checker_test.go:654–668  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

652}
653
654func TestCheckTypeExpressions(t *testing.T) {
655 for _, tc := range checkerTypeExpressionTests {
656 tc := tc
657 t.Run(tc.name, func(t *testing.T) {
658 ast, err := checker.Check(tc.expr, 0, 0)
659 testutil.FatalIfErr(t, err)
660
661 if !testutil.ExpectNoDiff(t, tc.expected, ast.Type().Root()) {
662 s := parser.Sexp{}
663 s.EmitTypes = true
664 t.Log("Typed AST:\n" + s.Dump(ast))
665 }
666 })
667 }
668}

Callers

nothing calls this directly

Calls 7

DumpMethod · 0.95
CheckFunction · 0.92
FatalIfErrFunction · 0.92
ExpectNoDiffFunction · 0.92
RootMethod · 0.65
TypeMethod · 0.65
RunMethod · 0.45

Tested by

no test coverage detected