summaryrefslogtreecommitdiff
path: root/include/test
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-11-25 16:36:57 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-11-25 17:19:10 +0100
commit2f91ab025de850fe5af8114565755a8deed55911 (patch)
treed2938c6bf46a7195d942407add7c97e78e1ae3b2 /include/test
parentec345c02d8fa5a7c7d4ea4ad08ae7be5303d9b20 (diff)
Merge two assertXPath overloads that both check number of nodes
Change-Id: I67eec623b90ab20330fa0c268152211b6bbdbe1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143301 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/test')
-rw-r--r--include/test/xmltesttools.hxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/include/test/xmltesttools.hxx b/include/test/xmltesttools.hxx
index a9f30f7d227d..09f06af5eb0d 100644
--- a/include/test/xmltesttools.hxx
+++ b/include/test/xmltesttools.hxx
@@ -66,10 +66,6 @@ protected:
*/
int countXPathNodes(const xmlDocUniquePtr& pXmlDoc, const OString& rXPath);
/**
- * Assert that rXPath exists, and returns exactly one node.
- */
- void assertXPath(const xmlDocUniquePtr& pXmlDoc, const OString& rXPath);
- /**
* Assert that rXPath exists, returns exactly one node, and the rXPath's attribute's value
* equals to the rExpected value.
*/
@@ -78,10 +74,10 @@ protected:
void assertXPathAttrs(const xmlDocUniquePtr& pXmlDoc, const OString& rXPath,
const std::vector<std::pair<OString, OUString>>& aPairVector);
/**
- * Assert that rXPath exists, and returns exactly nNumberOfNodes nodes.
- * Useful for checking that we do _not_ export some node (nNumberOfNodes == 0).
+ * Assert that rXPath exists, and returns exactly nNumberOfNodes nodes (1 by default).
+ * Also useful for checking that we do _not_ export some node (nNumberOfNodes == 0).
*/
- void assertXPath(const xmlDocUniquePtr& pXmlDoc, const OString& rXPath, int nNumberOfNodes);
+ void assertXPath(const xmlDocUniquePtr& pXmlDoc, const OString& rXPath, int nNumberOfNodes = 1);
/**
* Assert that rXPath exists, and its content equals rContent.
*/