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

Function TestSelectNil

common/ast/expr_test.go:402–414  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

400}
401
402func TestSelectNil(t *testing.T) {
403 expr := nilTestExpr(t)
404 sel := expr.AsSelect()
405 if sel.FieldName() != "" {
406 t.Errorf("sel.FieldName() got %s, wanted ''", sel.FieldName())
407 }
408 if sel.IsTestOnly() {
409 t.Error("sel.IsTestOnly() got true, wanted false")
410 }
411 if sel.Operand().Kind() != ast.UnspecifiedExprKind {
412 t.Errorf("sel.Operand() got %v, wanted unspecified", sel.Operand())
413 }
414}
415
416func TestStruct(t *testing.T) {
417 fac := ast.NewExprFactory()

Callers

nothing calls this directly

Calls 7

nilTestExprFunction · 0.85
AsSelectMethod · 0.65
FieldNameMethod · 0.65
IsTestOnlyMethod · 0.65
KindMethod · 0.65
OperandMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected