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

Function testRegexEnv

ext/regex_test.go:264–275  ·  view source on GitHub ↗
(t *testing.T, opts ...cel.EnvOption)

Source from the content-addressed store, hash-verified

262}
263
264func testRegexEnv(t *testing.T, opts ...cel.EnvOption) *cel.Env {
265 t.Helper()
266 baseOpts := []cel.EnvOption{
267 cel.OptionalTypes(),
268 Regex(),
269 }
270 env, err := cel.NewEnv(append(baseOpts, opts...)...)
271 if err != nil {
272 t.Fatalf("cel.NewEnv(Regex()) failed: %v", err)
273 }
274 return env
275}
276
277func TestRegexCosts(t *testing.T) {
278 tests := []struct {

Callers 4

TestRegexFunction · 0.85
TestRegexStaticErrorsFunction · 0.85
TestRegexRuntimeErrorsFunction · 0.85
TestRegexCostsFunction · 0.85

Calls 3

OptionalTypesFunction · 0.92
NewEnvFunction · 0.92
RegexFunction · 0.85

Tested by

no test coverage detected