(t *testing.T)
| 215 | } |
| 216 | |
| 217 | func TestFunctionMergeCollision(t *testing.T) { |
| 218 | maxFunc := Function("max", |
| 219 | Overload("max_int", []*Type{IntType}, IntType), |
| 220 | Overload("max_int2", []*Type{IntType}, IntType), |
| 221 | ) |
| 222 | _, err := NewCustomEnv(maxFunc, maxFunc) |
| 223 | if err == nil { |
| 224 | t.Fatal("NewCustomEnv() succeeded, wanted collision error") |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | func TestFunctionNoOverloads(t *testing.T) { |
| 229 | _, err := NewCustomEnv( |
nothing calls this directly
no test coverage detected