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

Function TestExceedsDepthNilSafety

common/ast/navigable_test.go:260–267  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

258}
259
260func TestExceedsDepthNilSafety(t *testing.T) {
261 if ast.ExceedsDepth(nil, 250) {
262 t.Error("ExceedsDepth(nil, 250) = true, wanted false")
263 }
264 if ast.ExceedsDepth(ast.NewAST(nil, nil), 250) {
265 t.Error("ExceedsDepth(emptyAST, 250) = true, wanted false")
266 }
267}
268
269func TestExceedsDepthBoundedTraversal(t *testing.T) {
270 // Build a synthetic AST nested far deeper than the parser's recursion limit would ever produce.

Callers

nothing calls this directly

Calls 3

ExceedsDepthFunction · 0.92
NewASTFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected