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

Function TestFunctionMergeCollision

cel/decls_test.go:217–226  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

215}
216
217func TestFunctionMergeCollision(t *testing.T) {
218 maxFunc := Function("max",
219 Overload("max_int", []*Type{IntType}, IntType),
220 Overload("max_int2", []*Type{IntType}, IntType),
221 )
222 _, err := NewCustomEnv(maxFunc, maxFunc)
223 if err == nil {
224 t.Fatal("NewCustomEnv() succeeded, wanted collision error")
225 }
226}
227
228func TestFunctionNoOverloads(t *testing.T) {
229 _, err := NewCustomEnv(

Callers

nothing calls this directly

Calls 3

NewCustomEnvFunction · 0.85
FunctionFunction · 0.70
OverloadFunction · 0.70

Tested by

no test coverage detected