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

Function TestExpr_map_default_values_compile_check

expr_test.go:1589–1607  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1587}
1588
1589func TestExpr_map_default_values_compile_check(t *testing.T) {
1590 tests := []struct {
1591 env any
1592 input string
1593 }{
1594 {
1595 mock.MapStringStringEnv{"foo": "bar"},
1596 `Split(foo, sep)`,
1597 },
1598 {
1599 mock.MapStringIntEnv{"foo": 1},
1600 `foo / bar`,
1601 },
1602 }
1603 for _, tt := range tests {
1604 _, err := expr.Compile(tt.input, expr.Env(tt.env), expr.AllowUndefinedVariables())
1605 require.NoError(t, err)
1606 }
1607}
1608
1609func TestExpr_calls_with_nil(t *testing.T) {
1610 env := map[string]any{

Callers

nothing calls this directly

Calls 4

CompileFunction · 0.92
EnvStruct · 0.92
AllowUndefinedVariablesFunction · 0.92
NoErrorFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…