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

Function addFunctionBindings

interpreter/interpreter_test.go:2686–2698  ·  view source on GitHub ↗
(t testing.TB, dispatcher Dispatcher)

Source from the content-addressed store, hash-verified

2684}
2685
2686func addFunctionBindings(t testing.TB, dispatcher Dispatcher) {
2687 funcs := stdlib.Functions()
2688 for _, fn := range funcs {
2689 bindings, err := fn.Bindings()
2690 if err != nil {
2691 t.Fatalf("fn.Bindings() failed for function %v. error: %v", fn.Name(), err)
2692 }
2693 err = dispatcher.Add(bindings...)
2694 if err != nil {
2695 t.Fatalf("dispatcher.Add() failed: %v", err)
2696 }
2697 }
2698}
2699
2700func funcDecl(t testing.TB, name string, opts ...decls.FunctionOpt) *decls.FunctionDecl {
2701 t.Helper()

Callers 4

TestPruneFunction · 0.85
programFunction · 0.85
newStandardInterpreterFunction · 0.85

Calls 4

FunctionsFunction · 0.92
BindingsMethod · 0.80
NameMethod · 0.65
AddMethod · 0.65

Tested by

no test coverage detected