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

Function TestCheck_AllowUndefinedVariables

checker/checker_test.go:807–820  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

805}
806
807func TestCheck_AllowUndefinedVariables(t *testing.T) {
808 type Env struct {
809 A int
810 }
811
812 tree, err := parser.Parse(`Any + fn()`)
813 require.NoError(t, err)
814
815 config := conf.New(Env{})
816 expr.AllowUndefinedVariables()(config)
817
818 _, err = checker.Check(tree, config)
819 assert.NoError(t, err)
820}
821
822func TestCheck_AllowUndefinedVariables_DefaultType(t *testing.T) {
823 env := map[string]bool{}

Callers

nothing calls this directly

Calls 6

ParseFunction · 0.92
NoErrorFunction · 0.92
NewFunction · 0.92
AllowUndefinedVariablesFunction · 0.92
CheckFunction · 0.92
NoErrorFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…