MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / TestMatrix

Method TestMatrix

integration_test/matrix_test.go:53–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51}
52
53func (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

Callers

nothing calls this directly

Calls 7

testFormatMethod · 0.95
SupportsLoadFunction · 0.92
SupportsSaveFunction · 0.92
RunMethod · 0.80
IsVectorMethod · 0.80
TMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected