diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-05-15 20:46:27 +0200 |
---|---|---|
committer | Xisco FaulĂ <xiscofauli@libreoffice.org> | 2020-05-16 00:09:25 +0200 |
commit | ec8dc357e68e20fa00a7d37f8c3195f571fb1fa6 (patch) | |
tree | c1098addcea50f950a9636738f0ba5e732d2aa5d /sw/qa/extras/ww8export | |
parent | 3bc8b14bea3c11159bdbd6fc4f9658fce3ba252e (diff) |
CppUnittest: assert shapes in odf files
found by bin/check-missing-export-asserts.py
Change-Id: I270b5dce748039427aaf5507006a8c145ef1419b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94331
Tested-by: Jenkins
Reviewed-by: Xisco FaulĂ <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/qa/extras/ww8export')
-rw-r--r-- | sw/qa/extras/ww8export/ww8export.cxx | 3 | ||||
-rw-r--r-- | sw/qa/extras/ww8export/ww8export2.cxx | 3 | ||||
-rw-r--r-- | sw/qa/extras/ww8export/ww8export3.cxx | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx index 9efd5aa9616e..f3325616f725 100644 --- a/sw/qa/extras/ww8export/ww8export.cxx +++ b/sw/qa/extras/ww8export/ww8export.cxx @@ -747,6 +747,7 @@ DECLARE_WW8EXPORT_TEST(testTscp, "tscp.doc") DECLARE_WW8EXPORT_TEST(testFdo45724, "fdo45724.odt") { + CPPUNIT_ASSERT_EQUAL(1, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); // The text and background color of the control shape was not correct. uno::Reference<drawing::XControlShape> xControlShape(getShape(1), uno::UNO_QUERY); @@ -865,6 +866,7 @@ DECLARE_WW8EXPORT_TEST(testCharacterBorder, "charborder.odt") DECLARE_WW8EXPORT_TEST(testTdf41542_imagePadding, "tdf41542_imagePadding.odt") { + CPPUNIT_ASSERT_EQUAL(3, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); // borderlessImage - image WITHOUT BORDERS : simulate padding with -crop text::GraphicCrop crop = getProperty<text::GraphicCrop>(getShape(2), "GraphicCrop"); @@ -949,6 +951,7 @@ DECLARE_WW8EXPORT_TEST(testCommentsNested, "comments-nested.doc") DECLARE_WW8EXPORT_TEST(testBorderColoursExport, "bordercolours.odt") { + CPPUNIT_ASSERT_EQUAL(1, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); // This is very close to testBorderColours in ww8import.cxx, but for export diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx index bc4819c15ddb..de6c3354c5f7 100644 --- a/sw/qa/extras/ww8export/ww8export2.cxx +++ b/sw/qa/extras/ww8export/ww8export2.cxx @@ -433,6 +433,7 @@ DECLARE_WW8EXPORT_TEST(testTdf111480, "tdf111480.doc") DECLARE_WW8EXPORT_TEST(testTdf70838, "tdf70838.odt") { + CPPUNIT_ASSERT_EQUAL(1, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); CPPUNIT_ASSERT(pTextDoc); @@ -444,6 +445,7 @@ DECLARE_WW8EXPORT_TEST(testTdf70838, "tdf70838.odt") DECLARE_WW8EXPORT_TEST(testTdf70838b_verticalRotation, "tdf70838b_verticalRotation.odt") { + CPPUNIT_ASSERT_EQUAL(3, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); CPPUNIT_ASSERT(pTextDoc); @@ -458,6 +460,7 @@ DECLARE_WW8EXPORT_TEST(testTdf70838b_verticalRotation, "tdf70838b_verticalRotati DECLARE_WW8EXPORT_TEST( testActiveXCheckbox, "checkbox_control.odt" ) { + CPPUNIT_ASSERT_EQUAL(2, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); // First check box anchored as a floating object uno::Reference<drawing::XControlShape> xControlShape; diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx index 976819fc9a26..85801a003f0f 100644 --- a/sw/qa/extras/ww8export/ww8export3.cxx +++ b/sw/qa/extras/ww8export/ww8export3.cxx @@ -488,6 +488,7 @@ DECLARE_WW8EXPORT_TEST(testImageCommentAtChar, "image-comment-at-char.doc") DECLARE_WW8EXPORT_TEST(testTdf126708emf, "tdf126708_containsemf.odt") { + CPPUNIT_ASSERT_EQUAL(1, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); auto xShape = getShape(1); // First check the size of the EMF graphic contained in the shape. @@ -506,6 +507,7 @@ DECLARE_WW8EXPORT_TEST(testTdf126708emf, "tdf126708_containsemf.odt") DECLARE_WW8EXPORT_TEST(testBtlrFrame, "btlr-frame.odt") { + CPPUNIT_ASSERT_EQUAL(1, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); if (!mbExported) { |