()
| 111 | } |
| 112 | |
| 113 | func (s *TrimTestSuite) TestColor() { |
| 114 | testCases := []testCase[trimTestCase]{ |
| 115 | { |
| 116 | opts: trimTestCase{threshold: 1}, |
| 117 | outSize: testSize{200, 170}, |
| 118 | }, |
| 119 | { |
| 120 | opts: trimTestCase{ |
| 121 | threshold: 1, |
| 122 | color: &color.Red, |
| 123 | }, |
| 124 | outSize: testSize{200, 170}, |
| 125 | }, |
| 126 | { |
| 127 | opts: trimTestCase{ |
| 128 | threshold: 1, |
| 129 | color: &color.Blue, |
| 130 | }, |
| 131 | outSize: testSize{200, 130}, |
| 132 | }, |
| 133 | { |
| 134 | opts: trimTestCase{ |
| 135 | threshold: 1, |
| 136 | color: &color.White, |
| 137 | }, |
| 138 | outSize: testSize{200, 200}, |
| 139 | }, |
| 140 | } |
| 141 | |
| 142 | for _, tc := range testCases { |
| 143 | s.Run(tc.opts.String(), func() { |
| 144 | tc.opts.sourceFile = "trim2.png" |
| 145 | s.processImageAndCheck(tc) |
| 146 | }) |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | func (s *TrimTestSuite) TestAlpha() { |
| 151 | testCases := []testCase[trimTestCase]{ |
nothing calls this directly
no test coverage detected