diff UnitTestsSources/DicomMapTests.cpp @ 3497:db71bd11affc

fix unit tests if dcmtk != 3.6.1
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 21 Aug 2019 16:57:02 +0200
parents 109631ed3564
children a57c8163d9ae fc26659493b6
line wrap: on
line diff
--- a/UnitTestsSources/DicomMapTests.cpp	Wed Aug 21 16:47:17 2019 +0200
+++ b/UnitTestsSources/DicomMapTests.cpp	Wed Aug 21 16:57:02 2019 +0200
@@ -867,7 +867,6 @@
     ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0028, 0x2000), true));   ASSERT_EQ("OB", s);
     ASSERT_TRUE(m.CopyToString(s, DicomTag(0x7fe0, 0x0009), true));   ASSERT_EQ("OD", s);
     ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0064, 0x0009), true));   ASSERT_EQ("OF", s);
-    ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0066, 0x0040), false));  ASSERT_EQ("46", s);
     ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0028, 0x1201), true));   ASSERT_EQ("OWOW", s);
     ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0010, 0x0010), false));  ASSERT_EQ("PN", s);
     ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0008, 0x0050), false));  ASSERT_EQ("SH", s);
@@ -882,6 +881,13 @@
     ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0008, 0x0120), false));  ASSERT_EQ("UR", s);
     ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0008, 0x0301), false));  ASSERT_EQ("17", s);
     ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0040, 0x0031), false));  ASSERT_EQ("UT", s);
+
+#if DCMTK_VERSION_NUMBER == 361
+    ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0066, 0x0040), false));
+#else
+    ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0066, 0x0040), true));
+#endif
+    ASSERT_EQ("46", s);
   }
 }
 
@@ -931,6 +937,6 @@
   {
     DicomMap m;
     m.FromDicomWeb(visitor.GetResult());
-    ASSERT_EQ(0, m.GetSize());  // Sequences are not handled by Orthanc::DicomMap
+    ASSERT_EQ(0u, m.GetSize());  // Sequences are not handled by Orthanc::DicomMap
   }
 }