mirror of
https://github.com/jezhiggins/arabica
synced 2024-12-26 21:58:39 +01:00
added another qname parsing test
This commit is contained in:
parent
412a7f2204
commit
1620541fb8
1 changed files with 12 additions and 0 deletions
|
@ -122,6 +122,17 @@ public:
|
|||
}
|
||||
} // testParseBadQName
|
||||
|
||||
void testParseQName()
|
||||
{
|
||||
QN q = QN::parseQName(SA::construct_from_utf8("hello"), false, QNT::uri_mapper);
|
||||
assertTrue(q.localName() == SA::construct_from_utf8("hello"));
|
||||
|
||||
QN q2 = QN::parseQName(SA::construct_from_utf8("h:hello"), false, QNT::uri_mapper);
|
||||
assertTrue(q2.localName() == SA::construct_from_utf8("hello"));
|
||||
assertTrue(q2.prefix() == SA::construct_from_utf8("h"));
|
||||
assertTrue(q2.namespaceUri() == SA::construct_from_utf8("http://test/"));
|
||||
} // testParseQName
|
||||
|
||||
}; // class QualifiedNameTest
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
|
@ -141,6 +152,7 @@ TestSuite* QualifiedNameTest_suite()
|
|||
suiteOfTests->addTest(new TestCaller<QNT>("testClarkName", &QNT::testClarkName));
|
||||
suiteOfTests->addTest(new TestCaller<QNT>("testPrefix", &QNT::testPrefix));
|
||||
suiteOfTests->addTest(new TestCaller<QNT>("testParseBadQName", &QNT::testParseBadQName));
|
||||
suiteOfTests->addTest(new TestCaller<QNT>("testParseQName", &QNT::testParseQName));
|
||||
|
||||
return suiteOfTests;
|
||||
} // QualifiedNameTest_suite
|
||||
|
|
Loading…
Reference in a new issue