()
| 51 | } |
| 52 | |
| 53 | func (s *MatrixTestSuite) TestMatrix() { |
| 54 | for _, source := range formats { |
| 55 | for _, target := range formats { |
| 56 | s.Run(fmt.Sprintf("%s/%s", source.String(), target.String()), func() { |
| 57 | if !source.IsVector() && target.IsVector() { |
| 58 | // we can not vectorize a raster image |
| 59 | s.T().Logf("Skipping %s -> %s conversion: we can not vectorize raster image", source.String(), target.String()) |
| 60 | return |
| 61 | } |
| 62 | |
| 63 | if !vips.SupportsLoad(source) { |
| 64 | s.T().Logf("Skipping %s -> %s conversion: source format not supported by VIPS", source.String(), target.String()) |
| 65 | return |
| 66 | } |
| 67 | |
| 68 | if !vips.SupportsSave(target) { |
| 69 | s.T().Logf("Skipping %s -> %s conversion: target format not supported by VIPS", source.String(), target.String()) |
| 70 | return |
| 71 | } |
| 72 | |
| 73 | s.testFormat(source, target) |
| 74 | }) |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | // testFormat fetches images iterates over images in the specified folder, |
| 80 | // runs imgproxy on each image, and compares the result with the reference image |
nothing calls this directly
no test coverage detected