(t *testing.T)
| 84 | } |
| 85 | |
| 86 | func TestManipulate(t *testing.T) { |
| 87 | tests := []struct { |
| 88 | filename string |
| 89 | configs ImageConfig |
| 90 | ot int |
| 91 | }{ |
| 92 | { |
| 93 | "./testdata/ben.jpg", |
| 94 | ImageConfig{ |
| 95 | Fill: false, |
| 96 | Width: 100, |
| 97 | Height: 100, |
| 98 | }, |
| 99 | 1, |
| 100 | }, |
| 101 | { |
| 102 | "./testdata/small-png.png", |
| 103 | ImageConfig{ |
| 104 | Fill: false, |
| 105 | Width: 100, |
| 106 | Height: 100, |
| 107 | }, |
| 108 | 4, |
| 109 | }, |
| 110 | } |
| 111 | |
| 112 | for _, tt := range tests { |
| 113 | _, err := Manipulate(openFile(tt.filename), tt.configs, 1) |
| 114 | if err != nil { |
| 115 | t.Errorf("received an error when manipulating image: %v", err) |
| 116 | } |
| 117 | } |
| 118 | } |
nothing calls this directly
no test coverage detected