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

Function TestCustomEnvError

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

Source from the content-addressed store, hash-verified

383}
384
385func TestCustomEnvError(t *testing.T) {
386 env, err := NewCustomEnv(StdLib(), StdLib())
387 if err != nil {
388 t.Fatalf("NewCustomEnv() failed: %v", err)
389 }
390 _, iss := compileOrError(t, env, "a.b.c == true")
391 if iss == nil {
392 t.Error("got successful compile, expected error for duplicate function declarations.")
393 }
394}
395
396func TestCustomEnv(t *testing.T) {
397 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