Mercurial > hg > orthanc
changeset 1692:4eaf164dd574
test SimplifyTags
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 08 Oct 2015 10:57:29 +0200 |
parents | e447f3cb8b30 |
children | 558b25228a23 |
files | UnitTestsSources/FromDcmtkTests.cpp |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/UnitTestsSources/FromDcmtkTests.cpp Thu Oct 08 10:53:14 2015 +0200 +++ b/UnitTestsSources/FromDcmtkTests.cpp Thu Oct 08 10:57:29 2015 +0200 @@ -36,6 +36,7 @@ #include "../OrthancServer/FromDcmtkBridge.h" #include "../OrthancServer/OrthancInitialization.h" #include "../OrthancServer/DicomModification.h" +#include "../OrthancServer/ServerToolbox.h" #include "../Core/OrthancException.h" #include "../Core/Images/ImageBuffer.h" #include "../Core/Images/PngReader.h" @@ -379,9 +380,15 @@ ASSERT_EQ(b["0008,1110"][1 - i]["0010,0010"].asString(), "Hello2"); ASSERT_EQ(b["0008,1110"][1 - i]["0010,0020"].asString(), "World2"); } - } + { + Json::Value b; + FromDcmtkBridge::ToJson(b, *element, DicomToJsonFormat_Full, 0, Encoding_Ascii); + Json::Value c; + SimplifyTags(c, b); - // TODO: Test Simplify + ASSERT_EQ(0, c["ReferencedStudySequence"].compare(a)); + } + } }