Mercurial > hg > orthanc
changeset 4700:863383e7e582
fix warnings in unit tests
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 21 Jun 2021 17:54:55 +0200 |
parents | facea16b055b |
children | 68635d365a27 |
files | OrthancFramework/UnitTestsSources/FromDcmtkTests.cpp OrthancFramework/UnitTestsSources/ZipTests.cpp |
diffstat | 2 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancFramework/UnitTestsSources/FromDcmtkTests.cpp Fri Jun 18 17:58:56 2021 +0200 +++ b/OrthancFramework/UnitTestsSources/FromDcmtkTests.cpp Mon Jun 21 17:54:55 2021 +0200 @@ -2295,7 +2295,7 @@ ASSERT_EQ(1u, path.GetPrefixLength()); ASSERT_EQ(DICOM_TAG_REFERENCED_PERFORMED_PROCEDURE_STEP_SEQUENCE, path.GetPrefixTag(0)); ASSERT_FALSE(path.IsPrefixUniversal(0)); - ASSERT_EQ(0, path.GetPrefixIndex(0)); + ASSERT_EQ(0u, path.GetPrefixIndex(0)); ASSERT_THROW(path.GetPrefixTag(1), OrthancException); ASSERT_EQ(DICOM_TAG_PATIENT_NAME, path.GetFinalTag()); @@ -2304,10 +2304,10 @@ ASSERT_EQ(2u, path.GetPrefixLength()); ASSERT_EQ(DICOM_TAG_REFERENCED_PERFORMED_PROCEDURE_STEP_SEQUENCE, path.GetPrefixTag(0)); ASSERT_FALSE(path.IsPrefixUniversal(0)); - ASSERT_EQ(1, path.GetPrefixIndex(0)); + ASSERT_EQ(1u, path.GetPrefixIndex(0)); ASSERT_EQ(DICOM_TAG_REFERENCED_PERFORMED_PROCEDURE_STEP_SEQUENCE, path.GetPrefixTag(1)); ASSERT_FALSE(path.IsPrefixUniversal(1)); - ASSERT_EQ(2, path.GetPrefixIndex(1)); + ASSERT_EQ(2u, path.GetPrefixIndex(1)); ASSERT_THROW(path.GetPrefixTag(2), OrthancException); ASSERT_EQ(DICOM_TAG_PATIENT_NAME, path.GetFinalTag()); @@ -2326,7 +2326,7 @@ ASSERT_EQ(2u, path.GetPrefixLength()); ASSERT_EQ(DICOM_TAG_REFERENCED_PERFORMED_PROCEDURE_STEP_SEQUENCE, path.GetPrefixTag(0)); ASSERT_FALSE(path.IsPrefixUniversal(0)); - ASSERT_EQ(1, path.GetPrefixIndex(0)); + ASSERT_EQ(1u, path.GetPrefixIndex(0)); ASSERT_EQ(DICOM_TAG_REFERENCED_PERFORMED_PROCEDURE_STEP_SEQUENCE, path.GetPrefixTag(0)); ASSERT_TRUE(path.IsPrefixUniversal(1)); ASSERT_THROW(path.GetPrefixIndex(1), OrthancException); @@ -2338,7 +2338,7 @@ ASSERT_EQ(1u, path.GetPrefixLength()); ASSERT_EQ(DICOM_TAG_PATIENT_ID, path.GetPrefixTag(0)); ASSERT_FALSE(path.IsPrefixUniversal(0)); - ASSERT_EQ(1, path.GetPrefixIndex(0)); + ASSERT_EQ(1u, path.GetPrefixIndex(0)); ASSERT_THROW(path.GetPrefixTag(1), OrthancException); ASSERT_EQ(DICOM_TAG_PATIENT_NAME, path.GetFinalTag()); @@ -2347,7 +2347,7 @@ ASSERT_EQ(1u, path.GetPrefixLength()); ASSERT_EQ(DICOM_TAG_PATIENT_ID, path.GetPrefixTag(0)); ASSERT_FALSE(path.IsPrefixUniversal(0)); - ASSERT_EQ(42, path.GetPrefixIndex(0)); + ASSERT_EQ(42u, path.GetPrefixIndex(0)); ASSERT_THROW(path.GetPrefixTag(1), OrthancException); ASSERT_EQ(DICOM_TAG_PATIENT_NAME, path.GetFinalTag()); ASSERT_EQ("(0010,0020)[42].(0010,0010)", path.Format());
--- a/OrthancFramework/UnitTestsSources/ZipTests.cpp Fri Jun 18 17:58:56 2021 +0200 +++ b/OrthancFramework/UnitTestsSources/ZipTests.cpp Mon Jun 21 17:54:55 2021 +0200 @@ -190,7 +190,7 @@ { Orthanc::ZipWriter w; - ASSERT_EQ(0, w.GetArchiveSize()); + ASSERT_EQ(0u, w.GetArchiveSize()); w.SetOutputPath(f.GetPath().c_str()); w.Open(); @@ -245,12 +245,12 @@ { Orthanc::ZipWriter w; - ASSERT_EQ(0, w.GetArchiveSize()); + ASSERT_EQ(0u, w.GetArchiveSize()); w.SetMemoryOutput(memory, (i == 0) /* ZIP64? */); w.Open(); - ASSERT_EQ(0, w.GetArchiveSize()); + ASSERT_EQ(0u, w.GetArchiveSize()); w.OpenFile("world/hello"); w.Write(large); @@ -264,7 +264,7 @@ ASSERT_TRUE(memory.empty()); uint64_t s1 = w.GetArchiveSize(); - ASSERT_NE(0, s1); + ASSERT_NE(0u, s1); w.Close(); archiveSize = w.GetArchiveSize();