diff UnitTestsSources/DicomMapTests.cpp @ 3015:abe49ca61cd5

On C-FIND, avoid accessing the storage area whenever possible
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 14 Dec 2018 12:10:03 +0100
parents 0e1755e5efd0
children 07ab06af90ed
line wrap: on
line diff
--- a/UnitTestsSources/DicomMapTests.cpp	Thu Dec 13 17:58:27 2018 +0100
+++ b/UnitTestsSources/DicomMapTests.cpp	Fri Dec 14 12:10:03 2018 +0100
@@ -511,6 +511,7 @@
 {
   DicomMap b;
   b.SetValue(DICOM_TAG_PATIENT_NAME, "E", false);
+  ASSERT_TRUE(b.HasOnlyMainDicomTags());
 
   {
     DicomMap a;
@@ -519,6 +520,7 @@
     a.SetValue(DICOM_TAG_SERIES_DESCRIPTION, "C", false);
     a.SetValue(DICOM_TAG_NUMBER_OF_FRAMES, "D", false);
     a.SetValue(DICOM_TAG_SLICE_THICKNESS, "F", false);
+    ASSERT_FALSE(a.HasOnlyMainDicomTags());
     b.ExtractMainDicomTags(a);
   }
 
@@ -528,6 +530,7 @@
   ASSERT_EQ("C", b.GetValue(DICOM_TAG_SERIES_DESCRIPTION).GetContent());
   ASSERT_EQ("D", b.GetValue(DICOM_TAG_NUMBER_OF_FRAMES).GetContent());
   ASSERT_FALSE(b.HasTag(DICOM_TAG_SLICE_THICKNESS));
+  ASSERT_TRUE(b.HasOnlyMainDicomTags());
 
   b.SetValue(DICOM_TAG_PATIENT_NAME, "G", false);
 
@@ -535,6 +538,7 @@
     DicomMap a;
     a.SetValue(DICOM_TAG_PATIENT_NAME, "A", false);
     a.SetValue(DICOM_TAG_SLICE_THICKNESS, "F", false);
+    ASSERT_FALSE(a.HasOnlyMainDicomTags());
     b.Merge(a);
   }
 
@@ -544,4 +548,5 @@
   ASSERT_EQ("C", b.GetValue(DICOM_TAG_SERIES_DESCRIPTION).GetContent());
   ASSERT_EQ("D", b.GetValue(DICOM_TAG_NUMBER_OF_FRAMES).GetContent());
   ASSERT_EQ("F", b.GetValue(DICOM_TAG_SLICE_THICKNESS).GetContent());
+  ASSERT_FALSE(b.HasOnlyMainDicomTags());
 }