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

Function resolveFunction

interpreter/activation_test.go:217–227  ·  view source on GitHub ↗

resolveFunction performs the lookup the way an evaluation does: the activation which supplies the bindings is located once, then consulted by name.

(t *testing.T, vars Activation, name string)

Source from the content-addressed store, hash-verified

215// resolveFunction performs the lookup the way an evaluation does: the activation which supplies
216// the bindings is located once, then consulted by name.
217func resolveFunction(t *testing.T, vars Activation, name string) (functions.LateBoundOp, bool) {
218 t.Helper()
219 fa, err := FindFunctionActivation(vars)
220 if err != nil {
221 t.Fatalf("FindFunctionActivation() failed: %v", err)
222 }
223 if fa == nil {
224 return nil, false
225 }
226 return fa.ResolveFunction(name)
227}
228
229func TestFunctionActivationComposition(t *testing.T) {
230 tests := []struct {

Callers 1

Calls 2

FindFunctionActivationFunction · 0.85
ResolveFunctionMethod · 0.65

Tested by

no test coverage detected