Mercurial > hg > orthanc
diff UnitTestsSources/FromDcmtkTests.cpp @ 3298:8711cd9b47c5
fix deprecated call
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 22 Feb 2019 16:59:08 +0100 |
parents | 9b0e67161600 |
children | f2f8aa6f78aa |
line wrap: on
line diff
--- a/UnitTestsSources/FromDcmtkTests.cpp Fri Feb 22 15:07:30 2019 +0100 +++ b/UnitTestsSources/FromDcmtkTests.cpp Fri Feb 22 16:59:08 2019 +0100 @@ -1569,31 +1569,31 @@ pugi::xml_document doc; doc.load_buffer(xml.c_str(), xml.size()); - pugi::xpath_node node = doc.select_single_node("//NativeDicomModel/DicomAttribute[@tag=\"00080005\"]/Value"); + pugi::xpath_node node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00080005\"]/Value"); ASSERT_STREQ("ISO_IR 192", node.node().text().as_string()); - node = doc.select_single_node("//NativeDicomModel/DicomAttribute[@tag=\"00080005\"]"); + node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00080005\"]"); ASSERT_STREQ("CS", node.node().attribute("vr").value()); - node = doc.select_single_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]"); + node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]"); ASSERT_STREQ("PN", node.node().attribute("vr").value()); - node = doc.select_single_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Alphabetic/FamilyName"); + node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Alphabetic/FamilyName"); ASSERT_STREQ("Hong", node.node().text().as_string()); - node = doc.select_single_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Alphabetic/GivenName"); + node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Alphabetic/GivenName"); ASSERT_STREQ("Gildong", node.node().text().as_string()); - node = doc.select_single_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Ideographic/FamilyName"); + node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Ideographic/FamilyName"); ASSERT_EQ(utf8.substr(13, 3), node.node().text().as_string()); - node = doc.select_single_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Ideographic/GivenName"); + node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Ideographic/GivenName"); ASSERT_EQ(utf8.substr(17, 6), node.node().text().as_string()); - node = doc.select_single_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Phonetic/FamilyName"); + node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Phonetic/FamilyName"); ASSERT_EQ(utf8.substr(24, 3), node.node().text().as_string()); - node = doc.select_single_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Phonetic/GivenName"); + node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Phonetic/GivenName"); ASSERT_EQ(utf8.substr(28), node.node().text().as_string()); #endif } @@ -1650,31 +1650,31 @@ pugi::xml_document doc; doc.load_buffer(xml.c_str(), xml.size()); - pugi::xpath_node node = doc.select_single_node("//NativeDicomModel/DicomAttribute[@tag=\"00080005\"]/Value"); + pugi::xpath_node node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00080005\"]/Value"); ASSERT_STREQ("ISO_IR 192", node.node().text().as_string()); - node = doc.select_single_node("//NativeDicomModel/DicomAttribute[@tag=\"00080005\"]"); + node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00080005\"]"); ASSERT_STREQ("CS", node.node().attribute("vr").value()); - node = doc.select_single_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]"); + node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]"); ASSERT_STREQ("PN", node.node().attribute("vr").value()); - node = doc.select_single_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Alphabetic/FamilyName"); + node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Alphabetic/FamilyName"); ASSERT_STREQ("Yamada", node.node().text().as_string()); - node = doc.select_single_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Alphabetic/GivenName"); + node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Alphabetic/GivenName"); ASSERT_STREQ("Tarou", node.node().text().as_string()); - node = doc.select_single_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Ideographic/FamilyName"); + node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Ideographic/FamilyName"); ASSERT_EQ(utf8.substr(13, 6), node.node().text().as_string()); - node = doc.select_single_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Ideographic/GivenName"); + node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Ideographic/GivenName"); ASSERT_EQ(utf8.substr(20, 6), node.node().text().as_string()); - node = doc.select_single_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Phonetic/FamilyName"); + node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Phonetic/FamilyName"); ASSERT_EQ(utf8.substr(27, 9), node.node().text().as_string()); - node = doc.select_single_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Phonetic/GivenName"); + node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Phonetic/GivenName"); ASSERT_EQ(utf8.substr(37), node.node().text().as_string()); #endif }