summaryrefslogtreecommitdiff
path: root/test/source/xmltesttools.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-04-30 09:30:48 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-04-30 09:38:38 +0200
commit76715b105fcfeffa140b03fb54d5c0846db1fba2 (patch)
tree00c6cacc1961b21a23b9e8de0a8073f50d4dda76 /test/source/xmltesttools.cxx
parent7a83960b9547652a09cc5de4f50aedce55bb5733 (diff)
test: move XmlTestTools API documentation to the header
Change-Id: Iae56b1fb68fde0cbc44f6b9e37ba1a66194b25e0
Diffstat (limited to 'test/source/xmltesttools.cxx')
-rw-r--r--test/source/xmltesttools.cxx26
1 files changed, 0 insertions, 26 deletions
diff --git a/test/source/xmltesttools.cxx b/test/source/xmltesttools.cxx
index 98153518fcf7..e80674d2238b 100644
--- a/test/source/xmltesttools.cxx
+++ b/test/source/xmltesttools.cxx
@@ -27,9 +27,6 @@ void XmlTestTools::registerNamespaces(xmlXPathContextPtr& /*pXmlXpathCtx*/)
{
}
-/**
- * Same as the assertXPath(), but don't assert: return the string instead.
- */
OUString XmlTestTools::getXPath(xmlDocPtr pXmlDoc, const OString& rXPath, const OString& rAttribute)
{
xmlNodeSetPtr pXmlNodes = getXPathNode(pXmlDoc, rXPath);
@@ -41,9 +38,6 @@ OUString XmlTestTools::getXPath(xmlDocPtr pXmlDoc, const OString& rXPath, const
return OUString::createFromAscii((const char*)xmlGetProp(pXmlNode, BAD_CAST(rAttribute.getStr())));
}
-/**
- * Same as the assertXPathContent(), but don't assert: return the string instead.
- */
OUString XmlTestTools::getXPathContent(xmlDocPtr pXmlDoc, const OString& rXPath)
{
xmlNodeSetPtr pXmlNodes = getXPathNode(pXmlDoc, rXPath);
@@ -55,11 +49,6 @@ OUString XmlTestTools::getXPathContent(xmlDocPtr pXmlDoc, const OString& rXPath)
return OUString::createFromAscii((const char*)((pXmlNode->children[0]).content));
}
-/**
- * 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 XmlTestTools::assertXPath(xmlDocPtr pXmlDoc, const OString& rXPath, const OString& rAttribute, const OUString& rExpectedValue)
{
OUString aValue = getXPath(pXmlDoc, rXPath, rAttribute);
@@ -67,10 +56,6 @@ void XmlTestTools::assertXPath(xmlDocPtr pXmlDoc, const OString& rXPath, const O
rExpectedValue, aValue);
}
-/**
- * Assert that rXPath exists, and returns exactly nNumberOfNodes nodes.
- * Useful for checking that we do _not_ export some node (nNumberOfNodes == 0).
- */
void XmlTestTools::assertXPath(xmlDocPtr pXmlDoc, const OString& rXPath, int nNumberOfNodes)
{
xmlNodeSetPtr pXmlNodes = getXPathNode(pXmlDoc, rXPath);
@@ -78,18 +63,11 @@ void XmlTestTools::assertXPath(xmlDocPtr pXmlDoc, const OString& rXPath, int nNu
nNumberOfNodes, xmlXPathNodeSetGetLength(pXmlNodes));
}
-/**
- * Assert that rXPath exists, and its content equals rContent.
- */
void XmlTestTools::assertXPathContent(xmlDocPtr pXmlDoc, const OString& rXPath, const OUString& rContent)
{
CPPUNIT_ASSERT_EQUAL_MESSAGE("XPath contents of child does not match", rContent, getXPathContent(pXmlDoc, rXPath));
}
-/**
- * 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 XmlTestTools::assertXPathChildren(xmlDocPtr pXmlDoc, const OString& rXPath, int nNumberOfChildNodes)
{
xmlNodeSetPtr pXmlNodes = getXPathNode(pXmlDoc, rXPath);
@@ -100,10 +78,6 @@ void XmlTestTools::assertXPathChildren(xmlDocPtr pXmlDoc, const OString& rXPath,
nNumberOfChildNodes, (int)xmlChildElementCount(pXmlNode));
}
-/**
- * Get the position of the child named rName of the parent node specified by rXPath.
- * Useful for checking relative order of elements.
- */
int XmlTestTools::getXPathPosition(xmlDocPtr pXmlDoc, const OString& rXPath, const OUString& rChildName)
{
xmlNodeSetPtr pXmlNodes = getXPathNode(pXmlDoc, rXPath);