diff UnitTestsSources/FromDcmtkTests.cpp @ 1971:869a87c08673

fix for mingw <= 4.2
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 11 Apr 2016 13:50:44 +0200
parents a1c1c606ce98
children 4b545a8b1f95
line wrap: on
line diff
--- a/UnitTestsSources/FromDcmtkTests.cpp	Mon Apr 11 13:07:15 2016 +0200
+++ b/UnitTestsSources/FromDcmtkTests.cpp	Mon Apr 11 13:50:44 2016 +0200
@@ -541,7 +541,7 @@
   Json::Value v;
   f.ToJson(v, DicomToJsonFormat_Short, DicomToJsonFlags_None, 0);
   ASSERT_EQ(Json::objectValue, v.type());
-  ASSERT_EQ(6, v.getMemberNames().size());
+  ASSERT_EQ(6u, v.getMemberNames().size());
   ASSERT_FALSE(v.isMember("7052,1000"));
   ASSERT_FALSE(v.isMember("7053,1000"));
   ASSERT_TRUE(v.isMember("7050,1000"));
@@ -550,7 +550,7 @@
 
   f.ToJson(v, DicomToJsonFormat_Short, static_cast<DicomToJsonFlags>(DicomToJsonFlags_IncludePrivateTags | DicomToJsonFlags_ConvertBinaryToNull), 0);
   ASSERT_EQ(Json::objectValue, v.type());
-  ASSERT_EQ(7, v.getMemberNames().size());
+  ASSERT_EQ(7u, v.getMemberNames().size());
   ASSERT_FALSE(v.isMember("7052,1000"));
   ASSERT_TRUE(v.isMember("7050,1000"));
   ASSERT_TRUE(v.isMember("7053,1000"));
@@ -559,7 +559,7 @@
 
   f.ToJson(v, DicomToJsonFormat_Short, DicomToJsonFlags_IncludePrivateTags, 0);
   ASSERT_EQ(Json::objectValue, v.type());
-  ASSERT_EQ(7, v.getMemberNames().size());
+  ASSERT_EQ(7u, v.getMemberNames().size());
   ASSERT_FALSE(v.isMember("7052,1000"));
   ASSERT_TRUE(v.isMember("7050,1000"));
   ASSERT_TRUE(v.isMember("7053,1000"));
@@ -572,7 +572,7 @@
 
   f.ToJson(v, DicomToJsonFormat_Short, static_cast<DicomToJsonFlags>(DicomToJsonFlags_IncludeUnknownTags | DicomToJsonFlags_ConvertBinaryToNull), 0);
   ASSERT_EQ(Json::objectValue, v.type());
-  ASSERT_EQ(7, v.getMemberNames().size());
+  ASSERT_EQ(7u, v.getMemberNames().size());
   ASSERT_TRUE(v.isMember("7050,1000"));
   ASSERT_TRUE(v.isMember("7052,1000"));
   ASSERT_FALSE(v.isMember("7053,1000"));
@@ -581,7 +581,7 @@
 
   f.ToJson(v, DicomToJsonFormat_Short, static_cast<DicomToJsonFlags>(DicomToJsonFlags_IncludeUnknownTags), 0);
   ASSERT_EQ(Json::objectValue, v.type());
-  ASSERT_EQ(7, v.getMemberNames().size());
+  ASSERT_EQ(7u, v.getMemberNames().size());
   ASSERT_TRUE(v.isMember("7050,1000"));
   ASSERT_TRUE(v.isMember("7052,1000"));
   ASSERT_FALSE(v.isMember("7053,1000"));
@@ -593,7 +593,7 @@
 
   f.ToJson(v, DicomToJsonFormat_Short, static_cast<DicomToJsonFlags>(DicomToJsonFlags_IncludeUnknownTags | DicomToJsonFlags_IncludePrivateTags | DicomToJsonFlags_ConvertBinaryToNull), 0);
   ASSERT_EQ(Json::objectValue, v.type());
-  ASSERT_EQ(8, v.getMemberNames().size());
+  ASSERT_EQ(8u, v.getMemberNames().size());
   ASSERT_TRUE(v.isMember("7050,1000"));
   ASSERT_TRUE(v.isMember("7052,1000"));
   ASSERT_TRUE(v.isMember("7053,1000"));
@@ -611,25 +611,25 @@
   Json::Value v;
   f.ToJson(v, DicomToJsonFormat_Short, DicomToJsonFlags_None, 0);
   ASSERT_EQ(Json::objectValue, v.type());
-  ASSERT_EQ(5, v.getMemberNames().size());
+  ASSERT_EQ(5u, v.getMemberNames().size());
   ASSERT_FALSE(v.isMember("7fe0,0010"));  
 
   f.ToJson(v, DicomToJsonFormat_Short, static_cast<DicomToJsonFlags>(DicomToJsonFlags_IncludePixelData | DicomToJsonFlags_ConvertBinaryToNull), 0);
   ASSERT_EQ(Json::objectValue, v.type());
-  ASSERT_EQ(6, v.getMemberNames().size());
+  ASSERT_EQ(6u, v.getMemberNames().size());
   ASSERT_TRUE(v.isMember("7fe0,0010"));  
   ASSERT_EQ(Json::nullValue, v["7fe0,0010"].type());  
 
   f.ToJson(v, DicomToJsonFormat_Short, static_cast<DicomToJsonFlags>(DicomToJsonFlags_IncludePixelData | DicomToJsonFlags_ConvertBinaryToAscii), 0);
   ASSERT_EQ(Json::objectValue, v.type());
-  ASSERT_EQ(6, v.getMemberNames().size());
+  ASSERT_EQ(6u, v.getMemberNames().size());
   ASSERT_TRUE(v.isMember("7fe0,0010"));  
   ASSERT_EQ(Json::stringValue, v["7fe0,0010"].type());  
   ASSERT_EQ("Pixels", v["7fe0,0010"].asString());  
 
   f.ToJson(v, DicomToJsonFormat_Short, DicomToJsonFlags_IncludePixelData, 0);
   ASSERT_EQ(Json::objectValue, v.type());
-  ASSERT_EQ(6, v.getMemberNames().size());
+  ASSERT_EQ(6u, v.getMemberNames().size());
   ASSERT_TRUE(v.isMember("7fe0,0010"));  
   ASSERT_EQ(Json::stringValue, v["7fe0,0010"].type());
   std::string mime, content;
@@ -807,8 +807,8 @@
     Orthanc::ParsedDicomFile f(s);
     
     std::auto_ptr<Orthanc::ImageAccessor> decoded(Orthanc::DicomImageDecoder::Decode(f, 0));
-    ASSERT_EQ(256, decoded->GetWidth());
-    ASSERT_EQ(256, decoded->GetHeight());
+    ASSERT_EQ(256u, decoded->GetWidth());
+    ASSERT_EQ(256u, decoded->GetHeight());
     ASSERT_EQ(Orthanc::PixelFormat_Grayscale8, decoded->GetFormat());
 
     for (int y = 0; y < 256; y++)
@@ -869,8 +869,8 @@
     Orthanc::ParsedDicomFile f(s);
     
     std::auto_ptr<Orthanc::ImageAccessor> decoded(Orthanc::DicomImageDecoder::Decode(f, 0));
-    ASSERT_EQ(384, decoded->GetWidth());
-    ASSERT_EQ(256, decoded->GetHeight());
+    ASSERT_EQ(384u, decoded->GetWidth());
+    ASSERT_EQ(256u, decoded->GetHeight());
     ASSERT_EQ(Orthanc::PixelFormat_RGB24, decoded->GetFormat());
 
     for (int y = 0; y < 256; y++)
@@ -923,8 +923,8 @@
     Orthanc::ParsedDicomFile f(s);
     
     std::auto_ptr<Orthanc::ImageAccessor> decoded(Orthanc::DicomImageDecoder::Decode(f, 0));
-    ASSERT_EQ(256, decoded->GetWidth());
-    ASSERT_EQ(256, decoded->GetHeight());
+    ASSERT_EQ(256u, decoded->GetWidth());
+    ASSERT_EQ(256u, decoded->GetHeight());
     ASSERT_EQ(Orthanc::PixelFormat_Grayscale16, decoded->GetFormat());
 
     for (int y = 0; y < 256; y++)
@@ -977,8 +977,8 @@
     Orthanc::ParsedDicomFile f(s);
     
     std::auto_ptr<Orthanc::ImageAccessor> decoded(Orthanc::DicomImageDecoder::Decode(f, 0));
-    ASSERT_EQ(256, decoded->GetWidth());
-    ASSERT_EQ(256, decoded->GetHeight());
+    ASSERT_EQ(256u, decoded->GetWidth());
+    ASSERT_EQ(256u, decoded->GetHeight());
     ASSERT_EQ(Orthanc::PixelFormat_SignedGrayscale16, decoded->GetFormat());
 
     for (int y = 0; y < 256; y++)