changeset 2411:82d5e305fbd9

fix gcc warnings in unit tests
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 29 Sep 2017 10:16:28 +0200
parents 3590c936e56f
children cad393b41bc3
files UnitTestsSources/FromDcmtkTests.cpp UnitTestsSources/UnitTestsMain.cpp
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/UnitTestsSources/FromDcmtkTests.cpp	Fri Sep 29 10:13:52 2017 +0200
+++ b/UnitTestsSources/FromDcmtkTests.cpp	Fri Sep 29 10:16:28 2017 +0200
@@ -1095,14 +1095,14 @@
   {
     DicomMap m;
     ParsedDicomFile dicom(m);
-    ASSERT_EQ(1, dicom.GetDcmtkObject().getDataset()->card());
+    ASSERT_EQ(1u, dicom.GetDcmtkObject().getDataset()->card());
     CheckEncoding(dicom, Encoding_Ascii);
   }
 
   {
     DicomMap m;
     ParsedDicomFile dicom(m, Encoding_Latin4);
-    ASSERT_EQ(1, dicom.GetDcmtkObject().getDataset()->card());
+    ASSERT_EQ(1u, dicom.GetDcmtkObject().getDataset()->card());
     CheckEncoding(dicom, Encoding_Latin4);
   }
 
@@ -1110,7 +1110,7 @@
     DicomMap m;
     m.SetValue(DICOM_TAG_SPECIFIC_CHARACTER_SET, "ISO_IR 148", false);
     ParsedDicomFile dicom(m);
-    ASSERT_EQ(1, dicom.GetDcmtkObject().getDataset()->card());
+    ASSERT_EQ(1u, dicom.GetDcmtkObject().getDataset()->card());
     CheckEncoding(dicom, Encoding_Latin5);
   }
 
@@ -1118,7 +1118,7 @@
     DicomMap m;
     m.SetValue(DICOM_TAG_SPECIFIC_CHARACTER_SET, "ISO_IR 148", false);
     ParsedDicomFile dicom(m, Encoding_Latin1);
-    ASSERT_EQ(1, dicom.GetDcmtkObject().getDataset()->card());
+    ASSERT_EQ(1u, dicom.GetDcmtkObject().getDataset()->card());
     CheckEncoding(dicom, Encoding_Latin5);
   }
 }
--- a/UnitTestsSources/UnitTestsMain.cpp	Fri Sep 29 10:13:52 2017 +0200
+++ b/UnitTestsSources/UnitTestsMain.cpp	Fri Sep 29 10:16:28 2017 +0200
@@ -977,7 +977,7 @@
   v = Json::objectValue;
   ASSERT_EQ("nope", Toolbox::GetJsonStringField(v, "hello", "nope"));
   ASSERT_EQ(-10, Toolbox::GetJsonIntegerField(v, "hello", -10));
-  ASSERT_EQ(10, Toolbox::GetJsonUnsignedIntegerField(v, "hello", 10));
+  ASSERT_EQ(10u, Toolbox::GetJsonUnsignedIntegerField(v, "hello", 10));
   ASSERT_TRUE(Toolbox::GetJsonBooleanField(v, "hello", true));
 
   v["hello"] = "world";
@@ -995,7 +995,7 @@
   v["hello"] = 42;
   ASSERT_THROW(Toolbox::GetJsonStringField(v, "hello", "nope"), OrthancException);
   ASSERT_EQ(42, Toolbox::GetJsonIntegerField(v, "hello", -10));
-  ASSERT_EQ(42, Toolbox::GetJsonUnsignedIntegerField(v, "hello", 10));
+  ASSERT_EQ(42u, Toolbox::GetJsonUnsignedIntegerField(v, "hello", 10));
   ASSERT_THROW(Toolbox::GetJsonBooleanField(v, "hello", true), OrthancException);
 
   v["hello"] = false;