diff options
Diffstat (limited to 'picture_test.go')
-rw-r--r-- | picture_test.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/picture_test.go b/picture_test.go index 97d3cd9..8c8d2e4 100644 --- a/picture_test.go +++ b/picture_test.go @@ -4,17 +4,18 @@ import ( "fmt" _ "image/png" "io/ioutil" + "path/filepath" "testing" ) func BenchmarkAddPictureFromBytes(b *testing.B) { f := NewFile() - imgFile, err := ioutil.ReadFile("logo.png") + imgFile, err := ioutil.ReadFile(filepath.Join("test", "images", "excel.png")) if err != nil { - panic("unable to load image for benchmark") + b.Error("unable to load image for benchmark") } b.ResetTimer() for i := 1; i <= b.N; i++ { - f.AddPictureFromBytes("Sheet1", fmt.Sprint("A", i), "", "logo", ".png", imgFile) + f.AddPictureFromBytes("Sheet1", fmt.Sprint("A", i), "", "excel", ".png", imgFile) } } |