Mercurial > hg > orthanc
diff UnitTestsSources/DicomMapTests.cpp @ 3551:173c7f363d8f
DicomMap::RemoveBinaryTags
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 26 Oct 2019 15:59:59 +0200 |
parents | 4beabcea3a5c |
children | 4de1b019ca71 |
line wrap: on
line diff
--- a/UnitTestsSources/DicomMapTests.cpp Fri Oct 25 18:09:42 2019 +0200 +++ b/UnitTestsSources/DicomMapTests.cpp Sat Oct 26 15:59:59 2019 +0200 @@ -566,6 +566,24 @@ } +TEST(DicomMap, RemoveBinary) +{ + DicomMap b; + b.SetValue(DICOM_TAG_PATIENT_NAME, "A", false); + b.SetValue(DICOM_TAG_PATIENT_ID, "B", true); + b.SetValue(DICOM_TAG_STUDY_INSTANCE_UID, DicomValue()); // NULL + b.SetValue(DICOM_TAG_SERIES_INSTANCE_UID, DicomValue("C", false)); + b.SetValue(DICOM_TAG_SOP_INSTANCE_UID, DicomValue("D", true)); + + b.RemoveBinaryTags(); + + std::string s; + ASSERT_EQ(2u, b.GetSize()); + ASSERT_TRUE(b.LookupStringValue(s, DICOM_TAG_PATIENT_NAME, false)); ASSERT_EQ("A", s); + ASSERT_TRUE(b.LookupStringValue(s, DICOM_TAG_SERIES_INSTANCE_UID, false)); ASSERT_EQ("C", s); +} + + TEST(DicomWebJson, Multiplicity) {