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

Function TestCustomEnvError

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

Source from the content-addressed store, hash-verified

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