(t *testing.T)
| 453 | } |
| 454 | |
| 455 | func TestExciseLoops(t *testing.T) { |
| 456 | for _, quick := range []bool{true, false} { |
| 457 | for i, test := range loopTests { |
| 458 | gotSet := make(contourSet) |
| 459 | c := &contour{ |
| 460 | backward: slices.Clone(test.c.backward), |
| 461 | forward: slices.Clone(test.c.forward), |
| 462 | } |
| 463 | gotSet[c] = struct{}{} |
| 464 | c.exciseLoops(gotSet, quick) |
| 465 | var got []*contour |
| 466 | for c := range gotSet { |
| 467 | got = append(got, c) |
| 468 | } |
| 469 | sort.Sort(testContour(got)) |
| 470 | if !reflect.DeepEqual(got, test.want) { |
| 471 | t.Errorf("unexpected loop excision result for %d quick=%t:\n\tgot:%v\n\twant:%v", |
| 472 | i, quick, testContour(got), testContour(test.want)) |
| 473 | } |
| 474 | } |
| 475 | } |
| 476 | } |
| 477 | |
| 478 | type testContour []*contour |
| 479 |
nothing calls this directly
no test coverage detected