Mercurial > hg > orthanc
comparison 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 |
comparison
equal
deleted
inserted
replaced
3496:109631ed3564 | 3497:db71bd11affc |
---|---|
865 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0008, 0x0070), false)); ASSERT_EQ("LO", s); | 865 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0008, 0x0070), false)); ASSERT_EQ("LO", s); |
866 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0010, 0x4000), false)); ASSERT_EQ("LT", s); | 866 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0010, 0x4000), false)); ASSERT_EQ("LT", s); |
867 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0028, 0x2000), true)); ASSERT_EQ("OB", s); | 867 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0028, 0x2000), true)); ASSERT_EQ("OB", s); |
868 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x7fe0, 0x0009), true)); ASSERT_EQ("OD", s); | 868 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x7fe0, 0x0009), true)); ASSERT_EQ("OD", s); |
869 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0064, 0x0009), true)); ASSERT_EQ("OF", s); | 869 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0064, 0x0009), true)); ASSERT_EQ("OF", s); |
870 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0066, 0x0040), false)); ASSERT_EQ("46", s); | |
871 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0028, 0x1201), true)); ASSERT_EQ("OWOW", s); | 870 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0028, 0x1201), true)); ASSERT_EQ("OWOW", s); |
872 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0010, 0x0010), false)); ASSERT_EQ("PN", s); | 871 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0010, 0x0010), false)); ASSERT_EQ("PN", s); |
873 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0008, 0x0050), false)); ASSERT_EQ("SH", s); | 872 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0008, 0x0050), false)); ASSERT_EQ("SH", s); |
874 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0018, 0x6020), false)); ASSERT_EQ("-15", s); | 873 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0018, 0x6020), false)); ASSERT_EQ("-15", s); |
875 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0018, 0x9219), false)); ASSERT_EQ("-16", s); | 874 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0018, 0x9219), false)); ASSERT_EQ("-16", s); |
880 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0008, 0x1161), false)); ASSERT_EQ("128", s); | 879 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0008, 0x1161), false)); ASSERT_EQ("128", s); |
881 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x4342, 0x1234), true)); ASSERT_EQ("UN", s); | 880 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x4342, 0x1234), true)); ASSERT_EQ("UN", s); |
882 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0008, 0x0120), false)); ASSERT_EQ("UR", s); | 881 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0008, 0x0120), false)); ASSERT_EQ("UR", s); |
883 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0008, 0x0301), false)); ASSERT_EQ("17", s); | 882 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0008, 0x0301), false)); ASSERT_EQ("17", s); |
884 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0040, 0x0031), false)); ASSERT_EQ("UT", s); | 883 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0040, 0x0031), false)); ASSERT_EQ("UT", s); |
884 | |
885 #if DCMTK_VERSION_NUMBER == 361 | |
886 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0066, 0x0040), false)); | |
887 #else | |
888 ASSERT_TRUE(m.CopyToString(s, DicomTag(0x0066, 0x0040), true)); | |
889 #endif | |
890 ASSERT_EQ("46", s); | |
885 } | 891 } |
886 } | 892 } |
887 | 893 |
888 | 894 |
889 TEST(DicomWebJson, Sequence) | 895 TEST(DicomWebJson, Sequence) |
929 visitor.FormatXml(xml); | 935 visitor.FormatXml(xml); |
930 | 936 |
931 { | 937 { |
932 DicomMap m; | 938 DicomMap m; |
933 m.FromDicomWeb(visitor.GetResult()); | 939 m.FromDicomWeb(visitor.GetResult()); |
934 ASSERT_EQ(0, m.GetSize()); // Sequences are not handled by Orthanc::DicomMap | 940 ASSERT_EQ(0u, m.GetSize()); // Sequences are not handled by Orthanc::DicomMap |
935 } | 941 } |
936 } | 942 } |