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

Function testMathEnv

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

Source from the content-addressed store, hash-verified

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

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