sd/qa/unit/export-tests-ooxml2.cxx |   14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

New commits:
commit e678e013a9b8d928353f1136b77469950bdd2cdc
Author:     Xisco Fauli <[email protected]>
AuthorDate: Wed Apr 27 09:50:29 2022 +0200
Commit:     Xisco Fauli <[email protected]>
CommitDate: Wed Apr 27 11:48:49 2022 +0200

    sd_export_tests-ooxml2: don't use try/catch in this test
    
    In general, try/catch shouldn't be used in unittests
    Follow-up of 9564747d2fd5d2c859a359dd7fa6242c6859c0d7
    "tdf#53970 PPTX: fix import of linked media files"
    
    Change-Id: Ibde31d033b0225ab47522eff01e156cbb2751f18
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133468
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/sd/qa/unit/export-tests-ooxml2.cxx 
b/sd/qa/unit/export-tests-ooxml2.cxx
index 56ff8b067763..dd3dbd286803 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -1832,16 +1832,10 @@ void SdOOXMLExportTest2::testTdf53970()
         CPPUNIT_ASSERT(xShape.is());
         OUString sVideoURL;
 
-        // Without fix in place, the media shape was imported as an image 
after export.
-        try
-        {
-            CPPUNIT_ASSERT_MESSAGE("MediaURL property is not set",
-                                   xShape->getPropertyValue("MediaURL") >>= 
sVideoURL);
-        }
-        catch (const beans::UnknownPropertyException&)
-        {
-            CPPUNIT_FAIL("Error: MediaURL is unknown property");
-        }
+        // Without fix in place, the media shape was imported as an image 
after export
+        // and this test would have failed with exception of type 
com.sun.star.beans.UnknownPropertyException
+        CPPUNIT_ASSERT_MESSAGE("MediaURL property is not set",
+                               xShape->getPropertyValue("MediaURL") >>= 
sVideoURL);
         CPPUNIT_ASSERT_MESSAGE("MediaURL is empty", !sVideoURL.isEmpty());
 
         xDocShRef->DoClose();

Reply via email to