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

Function TestCustomEnvError

cel/cel_test.go:281–290  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

279}
280
281func TestCustomEnvError(t *testing.T) {
282 env, err := NewCustomEnv(StdLib(), StdLib())
283 if err != nil {
284 t.Fatalf("NewCustomEnv() failed: %v", err)
285 }
286 _, iss := compileOrError(t, env, "a.b.c == true")
287 if iss == nil {
288 t.Error("got successful compile, expected error for duplicate function declarations.")
289 }
290}
291
292func TestCustomEnv(t *testing.T) {
293 env, err := NewCustomEnv(Variable("a.b.c", BoolType))

Callers

nothing calls this directly

Calls 4

NewCustomEnvFunction · 0.85
StdLibFunction · 0.85
compileOrErrorFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected