diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-04-30 09:30:48 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-04-30 09:38:38 +0200 |
commit | 76715b105fcfeffa140b03fb54d5c0846db1fba2 (patch) | |
tree | 00c6cacc1961b21a23b9e8de0a8073f50d4dda76 /include/test | |
parent | WaE: virtual function declaration not marked 'override' (diff) | |
download | core-76715b105fcfeffa140b03fb54d5c0846db1fba2.tar.gz core-76715b105fcfeffa140b03fb54d5c0846db1fba2.zip |
test: move XmlTestTools API documentation to the header
Change-Id: Iae56b1fb68fde0cbc44f6b9e37ba1a66194b25e0
Diffstat (limited to 'include/test')
-rw-r--r-- | include/test/xmltesttools.hxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/test/xmltesttools.hxx b/include/test/xmltesttools.hxx index a12d780ab59e..5a9cdb1fe3b0 100644 --- a/include/test/xmltesttools.hxx +++ b/include/test/xmltesttools.hxx @@ -31,14 +31,40 @@ protected: virtual void registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx); xmlNodeSetPtr getXPathNode(xmlDocPtr pXmlDoc, const OString& rXPath); + /** + * Same as the assertXPath(), but don't assert: return the string instead. + */ OUString getXPath(xmlDocPtr pXmlDoc, const OString& rXPath, const OString& rAttribute); + /** + * Same as the assertXPathContent(), but don't assert: return the string instead. + */ OUString getXPathContent(xmlDocPtr pXmlDoc, const OString& rXPath); + /** + * Get the position of the child named rName of the parent node specified by rXPath. + * Useful for checking relative order of elements. + */ int getXPathPosition(xmlDocPtr pXmlDoc, const OString& rXPath, const OUString& rChildName); + /** + * Assert that rXPath exists, and returns exactly one node. + * In case rAttribute is provided, the rXPath's attribute's value must + * equal to the rExpected value. + */ void assertXPath(xmlDocPtr pXmlDoc, const OString& rXPath, const OString& rAttribute = OString(), const OUString& rExpectedValue = OUString()); + /** + * Assert that rXPath exists, and returns exactly nNumberOfNodes nodes. + * Useful for checking that we do _not_ export some node (nNumberOfNodes == 0). + */ void assertXPath(xmlDocPtr pXmlDoc, const OString& rXPath, int nNumberOfNodes); + /** + * Assert that rXPath exists, and its content equals rContent. + */ void assertXPathContent(xmlDocPtr pXmlDoc, const OString& rXPath, const OUString& rContent); + /** + * Assert that rXPath exists, and has exactly nNumberOfChildNodes child nodes. + * Useful for checking that we do have a no child nodes to a specific node (nNumberOfChildNodes == 0). + */ void assertXPathChildren(xmlDocPtr pXmlDoc, const OString& rXPath, int nNumberOfChildNodes); }; |