(t *testing.T)
| 714 | } |
| 715 | |
| 716 | func TestOverloadBinaryBindingArgCountMismatch(t *testing.T) { |
| 717 | _, err := NewFunction("id", |
| 718 | Overload("id_any", []*types.Type{}, types.AnyType, |
| 719 | BinaryBinding(func(lhs, rhs ref.Val) ref.Val { |
| 720 | return lhs |
| 721 | }), |
| 722 | ), |
| 723 | ) |
| 724 | if err == nil || !strings.Contains(err.Error(), "non-binary overload") { |
| 725 | t.Errorf("NewFunction() got %v, wanted non-binary overload", err) |
| 726 | } |
| 727 | } |
| 728 | |
| 729 | func TestOverloadBinaryBindingRedefinition(t *testing.T) { |
| 730 | _, err := NewFunction("right", |
nothing calls this directly
no test coverage detected