diff options
author | Douglas Mencken <dougmencken@gmail.com> | 2014-06-15 08:39:00 -0400 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-16 12:29:35 +0000 |
commit | ca4f1929ced3714c99acc7c7458277459158683a (patch) | |
tree | 8ee3e31daea9d24c514df2f932861110fa0e3adf /test | |
parent | 61df5e69df443dad24acbd8257a83aadb3888099 (diff) |
xmlChildElementCount is only available in libxml2 >= 2.7.3
fixes build error Undefined symbols: _xmlChildElementCount
Change-Id: I9687971912b4d0ae55bf1d9ad987fd339fcbec7e
Reviewed-on: https://gerrit.libreoffice.org/9788
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/source/xmltesttools.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/source/xmltesttools.cxx b/test/source/xmltesttools.cxx index 0cb89f701201..129e286f4a53 100644 --- a/test/source/xmltesttools.cxx +++ b/test/source/xmltesttools.cxx @@ -98,6 +98,7 @@ void XmlTestTools::assertXPathContent(xmlDocPtr pXmlDoc, const OString& rXPath, void XmlTestTools::assertXPathChildren(xmlDocPtr pXmlDoc, const OString& rXPath, int nNumberOfChildNodes) { +#if LIBXML_VERSION >= 20703 /* xmlChildElementCount is only available in libxml2 >= 2.7.3 */ xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, rXPath); xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval; CPPUNIT_ASSERT_EQUAL_MESSAGE(OString("XPath '" + rXPath + "' number of nodes is incorrect").getStr(), @@ -106,6 +107,11 @@ void XmlTestTools::assertXPathChildren(xmlDocPtr pXmlDoc, const OString& rXPath, CPPUNIT_ASSERT_EQUAL_MESSAGE(OString("XPath '" + rXPath + "' number of child-nodes is incorrect").getStr(), nNumberOfChildNodes, (int)xmlChildElementCount(pXmlNode)); xmlXPathFreeObject(pXmlObj); +#else + (void)pXmlDoc; + (void)rXPath; + (void)nNumberOfChildNodes; +#endif } int XmlTestTools::getXPathPosition(xmlDocPtr pXmlDoc, const OString& rXPath, const OUString& rChildName) |