(t *testing.T)
| 593 | } |
| 594 | |
| 595 | func 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 | |
| 604 | func TestSingletonOverloadCollision(t *testing.T) { |
| 605 | fn, err := NewFunction("id", |
nothing calls this directly
no test coverage detected