MCPcopy Create free account
hub / github.com/cel-expr/cel-go / nilTestExpr

Function nilTestExpr

common/ast/expr_test.go:495–504  ·  view source on GitHub ↗
(t testing.TB)

Source from the content-addressed store, hash-verified

493}
494
495func nilTestExpr(t testing.TB) ast.Expr {
496 t.Helper()
497 fac := ast.NewExprFactory()
498 expr := fac.NewLiteral(1, types.NullValue)
499 expr.SetKindCase(nil)
500 if expr.Kind() != ast.UnspecifiedExprKind {
501 t.Fatalf("SetKindCase(nil) did not produce an unspecified expr kind: %v", expr.Kind())
502 }
503 return expr
504}
505
506func testIDGen(seed int64) ast.IDGenerator {
507 seen := map[int64]int64{}

Callers 9

TestSetKindCaseFunction · 0.85
TestCallNilFunction · 0.85
TestComprehensionNilFunction · 0.85
TestIdentNilFunction · 0.85
TestListNilFunction · 0.85
TestLiteralNilFunction · 0.85
TestMapNilFunction · 0.85
TestSelectNilFunction · 0.85
TestStructNilFunction · 0.85

Calls 4

NewLiteralMethod · 0.95
NewExprFactoryFunction · 0.92
SetKindCaseMethod · 0.65
KindMethod · 0.65

Tested by

no test coverage detected