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

Function TestReferenceInfoAddOverload

common/ast/ast_test.go:344–354  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

342}
343
344func TestReferenceInfoAddOverload(t *testing.T) {
345 add := ast.NewFunctionReference(overloads.AddBytes)
346 add.AddOverload(overloads.AddDouble)
347 if !add.Equals(ast.NewFunctionReference(overloads.AddBytes, overloads.AddDouble)) {
348 t.Error("AddOverload() did not produce equal references")
349 }
350 add.AddOverload(overloads.AddDouble)
351 if !add.Equals(ast.NewFunctionReference(overloads.AddBytes, overloads.AddDouble)) {
352 t.Error("repeated AddOverload() did not produce equal references")
353 }
354}
355
356func TestNewSourceInfoRelative(t *testing.T) {
357 sourceInfo := ast.NewSourceInfo(

Callers

nothing calls this directly

Calls 4

NewFunctionReferenceFunction · 0.92
EqualsMethod · 0.80
AddOverloadMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected