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 9564747d2f
"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 <xiscofauli@libreoffice.org>
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user