(t *testing.T)
| 336 | } |
| 337 | |
| 338 | func TestInferCaprefType(t *testing.T) { |
| 339 | for _, tc := range inferCaprefTypeTests { |
| 340 | tc := tc |
| 341 | t.Run(tc.pattern, func(t *testing.T) { |
| 342 | re, err := ParseRegexp(`(` + tc.pattern + `)`) |
| 343 | testutil.FatalIfErr(t, err) |
| 344 | r := InferCaprefType(re, 1) |
| 345 | if !Equals(tc.typ, r) { |
| 346 | t.Errorf("Types don't match: %q inferred %v, not %v", tc.pattern, r, tc.typ) |
| 347 | } |
| 348 | }) |
| 349 | } |
| 350 | } |
| 351 | |
| 352 | func TestTypeEquals(t *testing.T) { |
| 353 | if Equals(NewVariable(), NewVariable()) { |
nothing calls this directly
no test coverage detected