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

Function TestIdent

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

Source from the content-addressed store, hash-verified

263}
264
265func TestIdent(t *testing.T) {
266 fac := ast.NewExprFactory()
267 id := fac.NewIdent(1, "a")
268 if id.AsIdent() != "a" {
269 t.Errorf("id.AsIdent() got %s, wanted 'a'", id.AsIdent())
270 }
271 id.RenumberIDs(testIDGen(50))
272 if id.ID() != 51 {
273 t.Errorf("id.ID() got %d, wanted 51", id.ID())
274 }
275}
276
277func TestIdentNil(t *testing.T) {
278 expr := nilTestExpr(t)

Callers

nothing calls this directly

Calls 6

NewIdentMethod · 0.95
NewExprFactoryFunction · 0.92
testIDGenFunction · 0.85
AsIdentMethod · 0.65
RenumberIDsMethod · 0.65
IDMethod · 0.65

Tested by

no test coverage detected