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:
committed by
Tomaž Vajngerl
parent
4409ab6590
commit
752fe6689b
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user