diff UnitTestsSources/FromDcmtkTests.cpp @ 1417:8e23f16a198d

fix issues 35 and 37
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 10 Jun 2015 15:17:02 +0200
parents 0649c5aef34a
children 9f66a12eb8fc
line wrap: on
line diff
--- a/UnitTestsSources/FromDcmtkTests.cpp	Thu Jun 04 09:04:14 2015 +0200
+++ b/UnitTestsSources/FromDcmtkTests.cpp	Wed Jun 10 15:17:02 2015 +0200
@@ -289,8 +289,16 @@
 }
 
 
-TEST(FromDcmtkBridge, VR)
+TEST(FromDcmtkBridge, ValueRepresentation)
 {
-  ASSERT_TRUE(FromDcmtkBridge::IsPNValueRepresentation(DICOM_TAG_PATIENT_NAME));
-  ASSERT_FALSE(FromDcmtkBridge::IsPNValueRepresentation(DICOM_TAG_PATIENT_ID));
+  ASSERT_EQ(ValueRepresentation_PatientName, 
+            FromDcmtkBridge::GetValueRepresentation(DICOM_TAG_PATIENT_NAME));
+  ASSERT_EQ(ValueRepresentation_Date, 
+            FromDcmtkBridge::GetValueRepresentation(DicomTag(0x0008, 0x0020) /* StudyDate */));
+  ASSERT_EQ(ValueRepresentation_Time, 
+            FromDcmtkBridge::GetValueRepresentation(DicomTag(0x0008, 0x0030) /* StudyTime */));
+  ASSERT_EQ(ValueRepresentation_DateTime, 
+            FromDcmtkBridge::GetValueRepresentation(DicomTag(0x0008, 0x002a) /* AcquisitionDateTime */));
+  ASSERT_EQ(ValueRepresentation_Other, 
+            FromDcmtkBridge::GetValueRepresentation(DICOM_TAG_PATIENT_ID));
 }