test/source/unoapi_test.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 752fe6689b4f0c6796cb140cc86f9922fa88fbb4
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Sat Jul 12 08:38:58 2025 +0200
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Sun Jul 13 13:12:24 2025 +0200

    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 <qui...@gmail.com>
    Tested-by: Jenkins

diff --git a/test/source/unoapi_test.cxx b/test/source/unoapi_test.cxx
index 277d611cf122..3dcaa35b699e 100644
--- a/test/source/unoapi_test.cxx
+++ b/test/source/unoapi_test.cxx
@@ -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;
 }
 
  • core.git: test/source Andrea Gelmini (via logerrit)
    • core.git: test/source Tomaž Vajngerl (via logerrit)

Reply via email to