summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-03-02 14:30:16 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2023-03-02 16:11:11 +0000
commitdacbc0fccc8faa29cb8dd0688a6ec1d496df7bdd (patch)
tree15eecfd9a696f87dfd641963b37455913321b54c /sd
parentc0ded57e60200725dfa11e8b9b3ec766145e7719 (diff)
qa: simplify code
Change-Id: I79328b4f26eeb01bfda0502657bf0d47f3699fdb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148123 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/misc-tests.cxx30
1 files changed, 6 insertions, 24 deletions
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index ea391708d060..844037924bb1 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -541,18 +541,9 @@ void SdMiscTest::testTdf101242_ODF_no_settings()
"config:config-item-set[@config:name='ooo:view-settings']/"
"config:config-item-map-indexed[@config:name='Views']/"
"config:config-item-map-entry");
- xmlXPathObjectPtr pXmlObj
- = getXPathNode(pXmlDoc2, sPathStart2 + "/config:config-item[@config:name='VisibleLayers']");
- CPPUNIT_ASSERT_EQUAL(0, xmlXPathNodeSetGetLength(pXmlObj->nodesetval));
- xmlXPathFreeObject(pXmlObj);
- pXmlObj = getXPathNode(pXmlDoc2,
- sPathStart2 + "/config:config-item[@config:name='PrintableLayers']");
- CPPUNIT_ASSERT_EQUAL(0, xmlXPathNodeSetGetLength(pXmlObj->nodesetval));
- xmlXPathFreeObject(pXmlObj);
- pXmlObj
- = getXPathNode(pXmlDoc2, sPathStart2 + "/config:config-item[@config:name='LockedLayers']");
- CPPUNIT_ASSERT_EQUAL(0, xmlXPathNodeSetGetLength(pXmlObj->nodesetval));
- xmlXPathFreeObject(pXmlObj);
+ assertXPath(pXmlDoc2, sPathStart2 + "/config:config-item[@config:name='VisibleLayers']", 0);
+ assertXPath(pXmlDoc2, sPathStart2 + "/config:config-item[@config:name='PrintableLayers']", 0);
+ assertXPath(pXmlDoc2, sPathStart2 + "/config:config-item[@config:name='LockedLayers']", 0);
}
void SdMiscTest::testTdf101242_settings_keep()
@@ -642,18 +633,9 @@ void SdMiscTest::testTdf101242_settings_remove()
"config:config-item-set[@config:name='ooo:view-settings']/"
"config:config-item-map-indexed[@config:name='Views']/"
"config:config-item-map-entry");
- xmlXPathObjectPtr pXmlObj
- = getXPathNode(pXmlDoc2, sPathStart2 + "/config:config-item[@config:name='VisibleLayers']");
- CPPUNIT_ASSERT_EQUAL(0, xmlXPathNodeSetGetLength(pXmlObj->nodesetval));
- xmlXPathFreeObject(pXmlObj);
- pXmlObj = getXPathNode(pXmlDoc2,
- sPathStart2 + "/config:config-item[@config:name='PrintableLayers']");
- CPPUNIT_ASSERT_EQUAL(0, xmlXPathNodeSetGetLength(pXmlObj->nodesetval));
- xmlXPathFreeObject(pXmlObj);
- pXmlObj
- = getXPathNode(pXmlDoc2, sPathStart2 + "/config:config-item[@config:name='LockedLayers']");
- CPPUNIT_ASSERT_EQUAL(0, xmlXPathNodeSetGetLength(pXmlObj->nodesetval));
- xmlXPathFreeObject(pXmlObj);
+ assertXPath(pXmlDoc2, sPathStart2 + "/config:config-item[@config:name='VisibleLayers']", 0);
+ assertXPath(pXmlDoc2, sPathStart2 + "/config:config-item[@config:name='PrintableLayers']", 0);
+ assertXPath(pXmlDoc2, sPathStart2 + "/config:config-item[@config:name='LockedLayers']", 0);
}
void SdMiscTest::testTdf119392()