MCPcopy Create free account
hub / github.com/LevInteractive/imageup / TestManipulate

Function TestManipulate

gcp_test.go:86–118  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

84}
85
86func 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}

Callers

nothing calls this directly

Calls 2

ManipulateFunction · 0.85
openFileFunction · 0.85

Tested by

no test coverage detected