MCPcopy
hub / github.com/expr-lang/expr / TestNodeBudgetDisabled

Function TestNodeBudgetDisabled

parser/parser_test.go:1287–1297  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1285}
1286
1287func TestNodeBudgetDisabled(t *testing.T) {
1288 config := conf.CreateNew()
1289 config.MaxNodes = 0 // Disable node budget
1290
1291 expr := strings.Repeat("a + ", 1000) + "b"
1292 _, err := parser.ParseWithConfig(expr, config)
1293
1294 if err != nil && strings.Contains(err.Error(), "exceeds maximum allowed nodes") {
1295 t.Error("Node budget check should be disabled when MaxNodes is 0")
1296 }
1297}

Callers

nothing calls this directly

Calls 4

CreateNewFunction · 0.92
ParseWithConfigFunction · 0.92
ContainsMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…