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