# HG changeset patch # User Sebastien Jodogne # Date 1477927035 -3600 # Node ID 87b395a77c41974587c3ffe15d8709901defd297 # Parent 2fabd10737287774fe2bdeaad2dc37c8a0e4050a fix unit test diff -r 2fabd1073728 -r 87b395a77c41 UnitTestsSources/FromDcmtkTests.cpp --- a/UnitTestsSources/FromDcmtkTests.cpp Mon Oct 31 15:42:18 2016 +0100 +++ b/UnitTestsSources/FromDcmtkTests.cpp Mon Oct 31 16:17:15 2016 +0100 @@ -717,13 +717,17 @@ TEST(ParsedDicomFile, FromJson) { - FromDcmtkBridge::RegisterDictionaryTag(DicomTag(0x7057, 0x1000), ValueRepresentation_OtherByte, "MyPrivateTag", 1, 1, ""); - FromDcmtkBridge::RegisterDictionaryTag(DicomTag(0x7059, 0x1000), ValueRepresentation_OtherByte, "MyPrivateTag", 1, 1, ""); - FromDcmtkBridge::RegisterDictionaryTag(DicomTag(0x7050, 0x1000), ValueRepresentation_PersonName, "Declared public tag", 1, 1, ""); + FromDcmtkBridge::RegisterDictionaryTag(DicomTag(0x7057, 0x1000), ValueRepresentation_OtherByte, "MyPrivateTag2", 1, 1, "ORTHANC"); + FromDcmtkBridge::RegisterDictionaryTag(DicomTag(0x7059, 0x1000), ValueRepresentation_OtherByte, "MyPrivateTag3", 1, 1, ""); + FromDcmtkBridge::RegisterDictionaryTag(DicomTag(0x7050, 0x1000), ValueRepresentation_PersonName, "Declared public tag2", 1, 1, ""); Json::Value v; const std::string sopClassUid = "1.2.840.10008.5.1.4.1.1.1"; // CR Image Storage: + // Test the private creator + ASSERT_EQ(DcmTag_ERROR_TagName, FromDcmtkBridge::GetTagName(DicomTag(0x7057, 0x1000), "NOPE")); + ASSERT_EQ("MyPrivateTag2", FromDcmtkBridge::GetTagName(DicomTag(0x7057, 0x1000), "ORTHANC")); + { v["SOPClassUID"] = sopClassUid; v["SpecificCharacterSet"] = "ISO_IR 148"; // This is latin-5