(t *testing.T)
| 949 | } |
| 950 | |
| 951 | func TestFunctionDisableDeclaration(t *testing.T) { |
| 952 | fn, err := NewFunction("in", |
| 953 | DisableDeclaration(true), |
| 954 | Overload("in_list", |
| 955 | []*types.Type{types.NewListType(types.NewTypeParamType("K")), types.NewTypeParamType("K")}, |
| 956 | types.BoolType, |
| 957 | ), |
| 958 | ) |
| 959 | if err != nil { |
| 960 | t.Fatalf("NewFunction() failed: %v", err) |
| 961 | } |
| 962 | if !fn.IsDeclarationDisabled() { |
| 963 | t.Error("got declaration enabled, wanted disabled") |
| 964 | } |
| 965 | } |
| 966 | |
| 967 | func TestFunctionEnableDeclaration(t *testing.T) { |
| 968 | fn, err := NewFunction("in", |
nothing calls this directly
no test coverage detected