mirror of
https://github.com/jezhiggins/arabica
synced 2024-11-15 19:48:00 +01:00
fixed for new namespace node constructor
This commit is contained in:
parent
3874438091
commit
6a04f6ba58
1 changed files with 13 additions and 4 deletions
|
@ -686,7 +686,7 @@ public:
|
|||
void namespaceNodeTest1()
|
||||
{
|
||||
using namespace Arabica::XPath;
|
||||
Arabica::DOM::Node<string_type, string_adaptor> node(new impl::NamespaceNodeImpl<string_type, string_adaptor>(string_adaptor::construct_from_utf8("p"), string_adaptor::construct_from_utf8("test-uri")));
|
||||
Arabica::DOM::Node<string_type, string_adaptor> node(new impl::NamespaceNodeImpl<string_type, string_adaptor>(element1_, string_adaptor::construct_from_utf8("p"), string_adaptor::construct_from_utf8("test-uri")));
|
||||
Arabica::DOM::Node<string_type, string_adaptor> node2;
|
||||
|
||||
node2 = node;
|
||||
|
@ -697,7 +697,7 @@ public:
|
|||
using namespace Arabica::XPath;
|
||||
Arabica::DOM::Node<string_type, string_adaptor> node;
|
||||
{
|
||||
Arabica::DOM::Node<string_type, string_adaptor> node2(new impl::NamespaceNodeImpl<string_type, string_adaptor>(string_adaptor::construct_from_utf8("p"), string_adaptor::construct_from_utf8("test-uri")));
|
||||
Arabica::DOM::Node<string_type, string_adaptor> node2(new impl::NamespaceNodeImpl<string_type, string_adaptor>(element1_, string_adaptor::construct_from_utf8("p"), string_adaptor::construct_from_utf8("test-uri")));
|
||||
node = node2;
|
||||
}
|
||||
} // namespaceNodeTest2
|
||||
|
@ -707,7 +707,7 @@ public:
|
|||
using namespace Arabica::XPath;
|
||||
Arabica::DOM::Node<string_type, string_adaptor> node;
|
||||
{
|
||||
Arabica::DOM::Node<string_type, string_adaptor> node2(new impl::NamespaceNodeImpl<string_type, string_adaptor>(string_adaptor::construct_from_utf8("p"), string_adaptor::construct_from_utf8("test-uri")));
|
||||
Arabica::DOM::Node<string_type, string_adaptor> node2(new impl::NamespaceNodeImpl<string_type, string_adaptor>(element1_, string_adaptor::construct_from_utf8("p"), string_adaptor::construct_from_utf8("test-uri")));
|
||||
node = node2;
|
||||
}
|
||||
node = 0;
|
||||
|
@ -716,13 +716,21 @@ public:
|
|||
void namespaceNodeTest4()
|
||||
{
|
||||
using namespace Arabica::XPath;
|
||||
Arabica::DOM::Node<string_type, string_adaptor> node(new impl::NamespaceNodeImpl<string_type, string_adaptor>(string_adaptor::construct_from_utf8("p"), string_adaptor::construct_from_utf8("test-uri")));
|
||||
Arabica::DOM::Node<string_type, string_adaptor> node(new impl::NamespaceNodeImpl<string_type, string_adaptor>(element1_, string_adaptor::construct_from_utf8("p"), string_adaptor::construct_from_utf8("test-uri")));
|
||||
assertTrue(string_adaptor::construct_from_utf8("p") == node.getLocalName());
|
||||
assertTrue(string_adaptor::construct_from_utf8("test-uri") == node.getNodeValue());
|
||||
assertTrue(string_adaptor::construct_from_utf8("") == node.getNamespaceURI());
|
||||
assertTrue(string_adaptor::construct_from_utf8("p") == node.getNodeName());
|
||||
} // namespaceNodeTest4
|
||||
|
||||
void namespaceNodeTest5()
|
||||
{
|
||||
using namespace Arabica::XPath;
|
||||
Arabica::DOM::Node<string_type, string_adaptor> node(new impl::NamespaceNodeImpl<string_type, string_adaptor>(element1_, string_adaptor::construct_from_utf8("p"), string_adaptor::construct_from_utf8("test-uri")));
|
||||
assertTrue(element1_ == node.getParentNode());
|
||||
assertTrue(document_ == node.getOwnerDocument());
|
||||
} // namespaceNodeTest5
|
||||
|
||||
void namespaceAxisTest1()
|
||||
{
|
||||
Arabica::XPath::AxisEnumerator<string_type, string_adaptor> e(root_, Arabica::XPath::NAMESPACE);
|
||||
|
@ -954,6 +962,7 @@ TestSuite* NamespaceNodeTest_suite()
|
|||
suite->addTest(new TestCaller<AxisEnumeratorTest<string_type, string_adaptor> >("namespaceNodeTest2", &AxisEnumeratorTest<string_type, string_adaptor>::namespaceNodeTest2));
|
||||
suite->addTest(new TestCaller<AxisEnumeratorTest<string_type, string_adaptor> >("namespaceNodeTest3", &AxisEnumeratorTest<string_type, string_adaptor>::namespaceNodeTest3));
|
||||
suite->addTest(new TestCaller<AxisEnumeratorTest<string_type, string_adaptor> >("namespaceNodeTest4", &AxisEnumeratorTest<string_type, string_adaptor>::namespaceNodeTest4));
|
||||
suite->addTest(new TestCaller<AxisEnumeratorTest<string_type, string_adaptor> >("namespaceNodeTest5", &AxisEnumeratorTest<string_type, string_adaptor>::namespaceNodeTest5));
|
||||
|
||||
return suite;
|
||||
} // NamespaceNodeTest_suite
|
||||
|
|
Loading…
Reference in a new issue