From 0e86c57f5f5e34ab9d4d01cc8dbce09f983bd814 Mon Sep 17 00:00:00 2001 From: Jeroen Bobbeldijk Date: Sun, 6 Feb 2022 20:13:33 +0100 Subject: [PATCH] Properly skip --- shared_tests/fpdfview.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/shared_tests/fpdfview.go b/shared_tests/fpdfview.go index 011b1510..93cdf387 100644 --- a/shared_tests/fpdfview.go +++ b/shared_tests/fpdfview.go @@ -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{ @@ -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, })