diff options
author | fippo <fippo@yandex-team.ru> | 2022-02-10 16:50:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:08 +0300 |
commit | 7bf72dabd2102d9781c1ec7a754579757baa7b90 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/xml/document/xml-document_ut.cpp | |
parent | 3e57c324d47a3a202cb3c5a9648d2f92103d5213 (diff) | |
download | ydb-7bf72dabd2102d9781c1ec7a754579757baa7b90.tar.gz |
Restoring authorship annotation for <fippo@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/xml/document/xml-document_ut.cpp')
-rw-r--r-- | library/cpp/xml/document/xml-document_ut.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/library/cpp/xml/document/xml-document_ut.cpp b/library/cpp/xml/document/xml-document_ut.cpp index 11f548b814..9f537b75c4 100644 --- a/library/cpp/xml/document/xml-document_ut.cpp +++ b/library/cpp/xml/document/xml-document_ut.cpp @@ -92,28 +92,28 @@ Y_UNIT_TEST_SUITE(TestXmlDocument) { UNIT_ASSERT_EQUAL(root.Node("h:text", false, *ctxt).Value<TString>(), "Некоторый текст"); } Y_UNIT_TEST(XmlNodes) { - using namespace NXml; - TDocument xml("<?xml version=\"1.0\"?>\n" - "<root>qq<a><b>asdfg</b></a>ww<c></c></root>", - NXml::TDocument::String); - TNode root = xml.Root(); + using namespace NXml; + TDocument xml("<?xml version=\"1.0\"?>\n" + "<root>qq<a><b>asdfg</b></a>ww<c></c></root>", + NXml::TDocument::String); + TNode root = xml.Root(); UNIT_ASSERT_EQUAL(root.Value<TString>(), "qqasdfgww"); - TConstNode node = root.FirstChild(); - UNIT_ASSERT_EQUAL(node.IsText(), true); + TConstNode node = root.FirstChild(); + UNIT_ASSERT_EQUAL(node.IsText(), true); UNIT_ASSERT_EQUAL(node.Value<TString>(), "qq"); - node = node.NextSibling(); - UNIT_ASSERT_EQUAL(node.IsText(), false); - UNIT_ASSERT_EQUAL(node.Name(), "a"); + node = node.NextSibling(); + UNIT_ASSERT_EQUAL(node.IsText(), false); + UNIT_ASSERT_EQUAL(node.Name(), "a"); UNIT_ASSERT_EQUAL(node.Value<TString>(), "asdfg"); - node = node.NextSibling(); - UNIT_ASSERT_EQUAL(node.IsText(), true); + node = node.NextSibling(); + UNIT_ASSERT_EQUAL(node.IsText(), true); UNIT_ASSERT_EQUAL(node.Value<TString>(), "ww"); - node = node.NextSibling(); - UNIT_ASSERT_EQUAL(node.IsText(), false); - UNIT_ASSERT_EQUAL(node.Name(), "c"); + node = node.NextSibling(); + UNIT_ASSERT_EQUAL(node.IsText(), false); + UNIT_ASSERT_EQUAL(node.Name(), "c"); UNIT_ASSERT_EQUAL(node.Value<TString>(), ""); - node = node.NextSibling(); - UNIT_ASSERT_EQUAL(node.IsNull(), true); + node = node.NextSibling(); + UNIT_ASSERT_EQUAL(node.IsNull(), true); TStringStream iterLog; for (const auto& node2 : root.Nodes("/root/*")) { iterLog << node2.Name() << ';'; @@ -150,7 +150,7 @@ Y_UNIT_TEST_SUITE(TestXmlDocument) { UNIT_ASSERT_EXCEPTION(node.Name(), yexception); UNIT_ASSERT_EXCEPTION(node.Value<TString>(), yexception); UNIT_ASSERT_EXCEPTION(node.IsText(), yexception); - } + } Y_UNIT_TEST(DefVal) { using namespace NXml; TDocument xml("<?xml version=\"1.0\"?>\n" |