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

Function TestFunctionNoOverloads

common/decls/decls_test.go:595–602  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

593}
594
595func TestFunctionNoOverloads(t *testing.T) {
596 _, err := NewFunction("right", SingletonBinaryBinding(func(arg1, arg2 ref.Val) ref.Val {
597 return arg2
598 }))
599 if err == nil || !strings.Contains(err.Error(), "must have at least one overload") {
600 t.Errorf("NewFunction() got %v, wanted 'must have at least one overload'", err)
601 }
602}
603
604func TestSingletonOverloadCollision(t *testing.T) {
605 fn, err := NewFunction("id",

Callers

nothing calls this directly

Calls 4

NewFunctionFunction · 0.70
SingletonBinaryBindingFunction · 0.70
ContainsMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected