Skip to content

Commit

Permalink
Properly skip
Browse files Browse the repository at this point in the history
  • Loading branch information
jerbob92 committed Feb 6, 2022
1 parent bdba065 commit 0e86c57
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions shared_tests/fpdfview.go
Original file line number Diff line number Diff line change
Expand Up @@ -848,12 +848,13 @@ var _ = Describe("fpdfview", func() {
})

When("an external bitmap has been created", func() {
if TestType == "multi" {
Skip("External bitmap is not supported on multi-threaded usage")
}
var bitmap references.FPDF_BITMAP
var buffer []byte
BeforeEach(func() {
if TestType == "multi" {
Skip("External bitmap is not supported on multi-threaded usage")
}

buffer = make([]byte, (1000*4)*1000) // 1000 pixels in width * 4 bytes per pixel * 1000 pixels in height

FPDFBitmap_CreateEx, err := PdfiumInstance.FPDFBitmap_CreateEx(&requests.FPDFBitmap_CreateEx{
Expand All @@ -869,6 +870,10 @@ var _ = Describe("fpdfview", func() {
})

AfterEach(func() {
if TestType == "multi" {
Skip("External bitmap is not supported on multi-threaded usage")
}

FPDFBitmap_Destroy, err := PdfiumInstance.FPDFBitmap_Destroy(&requests.FPDFBitmap_Destroy{
Bitmap: bitmap,
})
Expand Down

0 comments on commit 0e86c57

Please sign in to comment.