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

Function TestFunctionMergeDuplicate

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

Source from the content-addressed store, hash-verified

174}
175
176func TestFunctionMergeDuplicate(t *testing.T) {
177 maxFunc := Function("max",
178 Overload("max_int", []*Type{IntType}, IntType),
179 Overload("max_int", []*Type{IntType}, IntType),
180 )
181 _, err := NewCustomEnv(maxFunc, maxFunc)
182 if err != nil {
183 t.Fatalf("NewCustomEnv() failed: %v", err)
184 }
185}
186
187func TestFunctionMergeDeclarationAndDefinition(t *testing.T) {
188 idFuncDecl := Function("id", Overload("id", []*Type{TypeParamType("T")}, TypeParamType("T"), OverloadIsNonStrict()))

Callers

nothing calls this directly

Calls 3

NewCustomEnvFunction · 0.85
FunctionFunction · 0.70
OverloadFunction · 0.70

Tested by

no test coverage detected