changeset 185:5185ae1d9af5

fix for msvc
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 12 Nov 2012 15:11:43 +0100
parents d4e967d401d3
children f68c039b0571
files UnitTests/ServerIndex.cpp
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/UnitTests/ServerIndex.cpp	Mon Nov 12 15:01:39 2012 +0100
+++ b/UnitTests/ServerIndex.cpp	Mon Nov 12 15:11:43 2012 +0100
@@ -72,8 +72,7 @@
   ASSERT_TRUE(index.GetParentPublicId(s, a[4])); ASSERT_EQ("c", s);
   ASSERT_TRUE(index.GetParentPublicId(s, a[5])); ASSERT_EQ("g", s);
 
-  /*
-    std::list<std::string> l;
+  std::list<std::string> l;
   index.GetChildrenPublicId(l, a[0]); ASSERT_EQ(1, l.size()); ASSERT_EQ("b", l.front());
   index.GetChildrenPublicId(l, a[1]); ASSERT_EQ(1, l.size()); ASSERT_EQ("c", l.front());
   index.GetChildrenPublicId(l, a[3]); ASSERT_EQ(0, l.size()); 
@@ -91,7 +90,6 @@
     ASSERT_EQ("d", l.back());
     ASSERT_EQ("e", l.front());
   }
-  */
 
   index.AttachFile(a[4], "_json", "my json file", 21, 42, CompressionType_Zlib);
   index.AttachFile(a[4], "_dicom", "my dicom file", 42);
@@ -139,8 +137,8 @@
   index.DeleteResource(a[0]);
 
   ASSERT_EQ(2, listener.deletedFiles_.size());
-  ASSERT_NE(listener.deletedFiles_.end(), listener.deletedFiles_.find("my json file"));
-  ASSERT_NE(listener.deletedFiles_.end(), listener.deletedFiles_.find("my dicom file"));
+  ASSERT_FALSE(listener.deletedFiles_.find("my json file") == listener.deletedFiles_.end());
+  ASSERT_FALSE(listener.deletedFiles_.find("my dicom file") == listener.deletedFiles_.end());
 
   ASSERT_EQ(2, index.GetTableRecordCount("Resources"));
   ASSERT_EQ(0, index.GetTableRecordCount("Metadata"));
@@ -152,7 +150,7 @@
   ASSERT_EQ(1, index.GetTableRecordCount("GlobalProperties"));
 
   ASSERT_EQ(3, listener.deletedFiles_.size());
-  ASSERT_NE(listener.deletedFiles_.end(), listener.deletedFiles_.find("world"));
+  ASSERT_FALSE(listener.deletedFiles_.find("world") == listener.deletedFiles_.end());
 }