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

Method String

processing/trim_test.go:52–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50}
51
52func (r trimTestCase) String() string {
53 var b bytes.Buffer
54
55 b.WriteString("_trim_")
56 b.WriteString("threshold_")
57 b.WriteString(strconv.Itoa(r.threshold))
58
59 if r.color != nil {
60 b.WriteString("_color_")
61 b.WriteString(r.color.String())
62 }
63
64 if r.equalHor {
65 b.WriteString("_equalHor")
66 }
67
68 if r.equalVer {
69 b.WriteString("_equalVer")
70 }
71
72 if b.String() == "" {
73 b.WriteString("default")
74 }
75
76 n, _ := strings.CutPrefix(b.String(), "_")
77 return n
78}
79
80func (s *TrimTestSuite) TestThreshold() {
81 testCases := []testCase[trimTestCase]{

Callers 3

TestThresholdMethod · 0.45
TestColorMethod · 0.45
TestAlphaMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected