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

Method TestWatermarkAnimation

processing/watermark_test.go:268–299  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

266}
267
268func (s *WatermarkTestSuite) TestWatermarkAnimation() {
269 testCases := []testCase[watermarkTestCase]{
270 {
271 opts: watermarkTestCase{
272 position: processing.GravityNorthWest,
273 xOffset: 10,
274 yOffset: 20,
275 dpr: 0.5,
276 opacity: 0.5,
277 },
278 outSize: testSize{246, 115},
279 },
280 {
281 opts: watermarkTestCase{
282 position: processing.GravityNorthWest,
283 xOffset: 10,
284 yOffset: 20,
285 dpr: 2,
286 opacity: 0.5,
287 },
288 outSize: testSize{492, 229},
289 },
290 }
291
292 for _, tc := range testCases {
293 s.Run(tc.opts.String(), func() {
294 tc.opts.sourceFile = "test-images/gif/gif.gif"
295
296 s.processImageAndCheck(tc)
297 })
298 }
299}
300
301func TestWatermark(t *testing.T) {
302 suite.Run(t, new(WatermarkTestSuite))

Callers

nothing calls this directly

Calls 3

RunMethod · 0.80
processImageAndCheckMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected