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

Function optimizerEnv

cel/optimizer_test.go:323–339  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

321}
322
323func optimizerEnv(t *testing.T) *cel.Env {
324 t.Helper()
325 opts := []cel.EnvOption{
326 cel.Types(&proto3pb.TestAllTypes{}),
327 cel.OptionalTypes(),
328 cel.EnableMacroCallTracking(),
329 ext.Bindings(),
330 cel.Variable("a", cel.MapType(cel.StringType, cel.StringType)),
331 cel.Variable("x", cel.MapType(cel.StringType, cel.StringType)),
332 cel.Variable("y", cel.MapType(cel.StringType, cel.StringType)),
333 }
334 e, err := cel.NewEnv(opts...)
335 if err != nil {
336 t.Fatalf("NewEnv() failed: %v", err)
337 }
338 return e
339}

Callers 4

TestOptimizeWithSourceFunction · 0.85

Calls 6

TypesFunction · 0.92
OptionalTypesFunction · 0.92
EnableMacroCallTrackingFunction · 0.92
BindingsFunction · 0.92
VariableFunction · 0.92
NewEnvFunction · 0.92

Tested by

no test coverage detected