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

Function testMathEnv

ext/math_test.go:662–670  ·  view source on GitHub ↗
(t *testing.T, opts ...cel.EnvOption)

Source from the content-addressed store, hash-verified

660}
661
662func testMathEnv(t *testing.T, opts ...cel.EnvOption) *cel.Env {
663 t.Helper()
664 baseOpts := []cel.EnvOption{Math(), cel.EnableMacroCallTracking()}
665 env, err := cel.NewEnv(append(baseOpts, opts...)...)
666 if err != nil {
667 t.Fatalf("cel.NewEnv(Math()) failed: %v", err)
668 }
669 return env
670}
671
672func testMathCostsEnv(t *testing.T, version int, opts ...cel.EnvOption) *cel.Env {
673 t.Helper()

Callers 5

TestMathFunction · 0.85
TestMathStaticErrorsFunction · 0.85
TestMathRuntimeErrorsFunction · 0.85
TestMathNonMatchFunction · 0.85
TestMathWithExtensionFunction · 0.85

Calls 3

EnableMacroCallTrackingFunction · 0.92
NewEnvFunction · 0.92
MathFunction · 0.85

Tested by

no test coverage detected