test: write the PDFium error message why PDF couldn't be opened

Change-Id: I5c0ba956694fde5b4a68bcd316cf435ac72af5c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187763
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
This commit is contained in:
Tomaž Vajngerl
2025-07-13 13:12:24 +02:00
committed by Tomaž Vajngerl
parent 4409ab6590
commit 752fe6689b
+5 -1
View File
@@ -211,7 +211,11 @@ std::unique_ptr<vcl::pdf::PDFiumDocument> UnoApiTest::parsePDFExport(const OStri
}
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument
= pPDFium->openDocument(maMemory.GetData(), maMemory.GetSize(), rPassword);
CPPUNIT_ASSERT(pPdfDocument);
if (!pPdfDocument)
{
OString aError = OUStringToOString(pPDFium->getLastError(), RTL_TEXTENCODING_UTF8);
CPPUNIT_ASSERT_MESSAGE(aError.getStr(), pPdfDocument);
}
return pPdfDocument;
}