(t *testing.T)
| 174 | } |
| 175 | |
| 176 | func TestFunctionMergeDuplicate(t *testing.T) { |
| 177 | maxFunc := Function("max", |
| 178 | Overload("max_int", []*Type{IntType}, IntType), |
| 179 | Overload("max_int", []*Type{IntType}, IntType), |
| 180 | ) |
| 181 | _, err := NewCustomEnv(maxFunc, maxFunc) |
| 182 | if err != nil { |
| 183 | t.Fatalf("NewCustomEnv() failed: %v", err) |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | func TestFunctionMergeDeclarationAndDefinition(t *testing.T) { |
| 188 | idFuncDecl := Function("id", Overload("id", []*Type{TypeParamType("T")}, TypeParamType("T"), OverloadIsNonStrict())) |
nothing calls this directly
no test coverage detected