Cleaning: Remove compiler warning for LayerManagerService_Test
authorFrédéric Blain <frederic.blain@valeo.com>
Wed, 4 Jul 2012 12:46:54 +0000 (14:46 +0200)
committerTimo Lotterbach <timo.lotterbach@bmw-carit.de>
Tue, 10 Jul 2012 13:03:24 +0000 (06:03 -0700)
LayerManagerService/tests/GraphicalGroupTest.cpp
LayerManagerService/tests/RectangleTest.cpp
LayerManagerService/tests/SurfaceTest.cpp

index ca13fd5..1bd5769 100644 (file)
@@ -64,7 +64,7 @@ TEST_F(GraphicalGroupTest, defaultConstructor_Layer)
     ASSERT_TRUE(pLayerGroup);
 
     /// make sure, layer group is initially empty
-    EXPECT_EQ(0, pLayerGroup->getList().size());
+    EXPECT_EQ(0u, pLayerGroup->getList().size());
 
     // cleanup
     if (pLayerGroup)
@@ -84,7 +84,7 @@ TEST_F(GraphicalGroupTest, defaultConstructor_Surface)
     ASSERT_TRUE(pSurfaceGroup);
 
     /// make sure, surface group is initially empty
-    EXPECT_EQ(0, pSurfaceGroup->getList().size());
+    EXPECT_EQ(0u, pSurfaceGroup->getList().size());
 
     // cleanup
     if (pSurfaceGroup)
@@ -109,7 +109,7 @@ TEST_F(GraphicalGroupTest, specialConstructor_Layer)
     EXPECT_EQ(expectedId, pLayerGroup->getID());
 
     /// make sure, layer group is initially empty
-    EXPECT_EQ(0, pLayerGroup->getList().size());
+    EXPECT_EQ(0u, pLayerGroup->getList().size());
 
     // cleanup
     if (pLayerGroup)
@@ -134,7 +134,7 @@ TEST_F(GraphicalGroupTest, specialConstructor_Surface)
     EXPECT_EQ(expectedId, pSurfaceGroup->getID());
 
     /// make sure, surface group is initially empty
-    EXPECT_EQ(0, pSurfaceGroup->getList().size());
+    EXPECT_EQ(0u, pSurfaceGroup->getList().size());
 
     // cleanup
     if (pSurfaceGroup)
@@ -326,7 +326,7 @@ TEST_F(GraphicalGroupTest, setOpacity_Surface)
 TEST_F(GraphicalGroupTest, getList_Layer)
 {
     /// make sure, list is empty
-    EXPECT_EQ(0, m_pLayerGroup->getList().size());
+    EXPECT_EQ(0u, m_pLayerGroup->getList().size());
 
     /// add 3 layers to graphical group
     Layer l1, l2, l3;
@@ -335,26 +335,26 @@ TEST_F(GraphicalGroupTest, getList_Layer)
     m_pLayerGroup->addElement(&l3);
 
     /// make sure, list not contains 3 elements
-    EXPECT_EQ(3, m_pLayerGroup->getList().size());
+    EXPECT_EQ(3u, m_pLayerGroup->getList().size());
 
     /// remove 2 layers from graphical group
     m_pLayerGroup->removeElement(&l2);
     m_pLayerGroup->removeElement(&l3);
 
     /// make sure, list not contains 1 element
-    EXPECT_EQ(1, m_pLayerGroup->getList().size());
+    EXPECT_EQ(1u, m_pLayerGroup->getList().size());
 
     /// remove last layers from graphical group
     m_pLayerGroup->removeElement(&l1);
 
     /// make sure, list is empty
-    EXPECT_EQ(0, m_pLayerGroup->getList().size());
+    EXPECT_EQ(0u, m_pLayerGroup->getList().size());
 }
 
 TEST_F(GraphicalGroupTest, getList_Surface)
 {
     /// make sure, list is empty
-    EXPECT_EQ(0, m_pSurfaceGroup->getList().size());
+    EXPECT_EQ(0u, m_pSurfaceGroup->getList().size());
 
     /// add 3 surfaces to graphical group
     Surface l1, l2, l3;
@@ -363,33 +363,33 @@ TEST_F(GraphicalGroupTest, getList_Surface)
     m_pSurfaceGroup->addElement(&l3);
 
     /// make sure, list not contains 3 elements
-    EXPECT_EQ(3, m_pSurfaceGroup->getList().size());
+    EXPECT_EQ(3u, m_pSurfaceGroup->getList().size());
 
     /// remove 2 surfaces from graphical group
     m_pSurfaceGroup->removeElement(&l2);
     m_pSurfaceGroup->removeElement(&l3);
 
     /// make sure, list not contains 1 element
-    EXPECT_EQ(1, m_pSurfaceGroup->getList().size());
+    EXPECT_EQ(1u, m_pSurfaceGroup->getList().size());
 
     /// remove last surfaces from graphical group
     m_pSurfaceGroup->removeElement(&l1);
 
     /// make sure, list is empty
-    EXPECT_EQ(0, m_pSurfaceGroup->getList().size());
+    EXPECT_EQ(0u, m_pSurfaceGroup->getList().size());
 }
 
 TEST_F(GraphicalGroupTest, addElement_Layer)
 {
     /// make sure, list is empty
-    EXPECT_EQ(0, m_pLayerGroup->getList().size());
+    EXPECT_EQ(0u, m_pLayerGroup->getList().size());
 
     /// add 1 layer to graphical group
     Layer l1;
     m_pLayerGroup->addElement(&l1);
 
     /// make sure, list not contains 1 element
-    EXPECT_EQ(1, m_pLayerGroup->getList().size());
+    EXPECT_EQ(1u, m_pLayerGroup->getList().size());
 
     /// add 2 layers to graphical group
     Layer l2, l3;
@@ -397,20 +397,20 @@ TEST_F(GraphicalGroupTest, addElement_Layer)
     m_pLayerGroup->addElement(&l3);
 
     /// make sure, list contains 3 element
-    EXPECT_EQ(3, m_pLayerGroup->getList().size());
+    EXPECT_EQ(3u, m_pLayerGroup->getList().size());
 }
 
 TEST_F(GraphicalGroupTest, addElement_Surface)
 {
     /// make sure, list is empty
-    EXPECT_EQ(0, m_pSurfaceGroup->getList().size());
+    EXPECT_EQ(0u, m_pSurfaceGroup->getList().size());
 
     /// add 1 surface to graphical group
     Surface l1;
     m_pSurfaceGroup->addElement(&l1);
 
     /// make sure, list not contains 1 element
-    EXPECT_EQ(1, m_pSurfaceGroup->getList().size());
+    EXPECT_EQ(1u, m_pSurfaceGroup->getList().size());
 
     /// add 2 surfaces to graphical group
     Surface l2, l3;
@@ -418,13 +418,13 @@ TEST_F(GraphicalGroupTest, addElement_Surface)
     m_pSurfaceGroup->addElement(&l3);
 
     /// make sure, list contains 3 element
-    EXPECT_EQ(3, m_pSurfaceGroup->getList().size());
+    EXPECT_EQ(3u, m_pSurfaceGroup->getList().size());
 }
 
 TEST_F(GraphicalGroupTest, removeElement_Layer)
 {
     /// make sure, list is empty
-    EXPECT_EQ(0, m_pLayerGroup->getList().size());
+    EXPECT_EQ(0u, m_pLayerGroup->getList().size());
 
     /// add 3 layers to graphical group
     Layer l1, l2, l3;
@@ -433,26 +433,26 @@ TEST_F(GraphicalGroupTest, removeElement_Layer)
     m_pLayerGroup->addElement(&l3);
 
     /// make sure, list not contains 3 elements
-    EXPECT_EQ(3, m_pLayerGroup->getList().size());
+    EXPECT_EQ(3u, m_pLayerGroup->getList().size());
 
     /// remove 2 layers from graphical group
     m_pLayerGroup->removeElement(&l2);
     m_pLayerGroup->removeElement(&l3);
 
     /// make sure, list not contains 1 element
-    EXPECT_EQ(1, m_pLayerGroup->getList().size());
+    EXPECT_EQ(1u, m_pLayerGroup->getList().size());
 
     /// remove last layers from graphical group
     m_pLayerGroup->removeElement(&l1);
 
     /// make sure, list is empty
-    EXPECT_EQ(0, m_pLayerGroup->getList().size());
+    EXPECT_EQ(0u, m_pLayerGroup->getList().size());
 }
 
 TEST_F(GraphicalGroupTest, removeElement_Surface)
 {
     /// make sure, list is empty
-    EXPECT_EQ(0, m_pSurfaceGroup->getList().size());
+    EXPECT_EQ(0u, m_pSurfaceGroup->getList().size());
 
     /// add 3 surfaces to graphical group
     Surface l1, l2, l3;
@@ -461,20 +461,20 @@ TEST_F(GraphicalGroupTest, removeElement_Surface)
     m_pSurfaceGroup->addElement(&l3);
 
     /// make sure, list not contains 3 elements
-    EXPECT_EQ(3, m_pSurfaceGroup->getList().size());
+    EXPECT_EQ(3u, m_pSurfaceGroup->getList().size());
 
     /// remove 2 surfaces from graphical group
     m_pSurfaceGroup->removeElement(&l2);
     m_pSurfaceGroup->removeElement(&l3);
 
     /// make sure, list not contains 1 element
-    EXPECT_EQ(1, m_pSurfaceGroup->getList().size());
+    EXPECT_EQ(1u, m_pSurfaceGroup->getList().size());
 
     /// remove last surfaces from graphical group
     m_pSurfaceGroup->removeElement(&l1);
 
     /// make sure, list is empty
-    EXPECT_EQ(0, m_pSurfaceGroup->getList().size());
+    EXPECT_EQ(0u, m_pSurfaceGroup->getList().size());
 }
 
 TEST_F(GraphicalGroupTest, DISABLED_getShader)
index 0ae843d..835c3ae 100644 (file)
@@ -27,10 +27,10 @@ TEST(RectangleTest, defaultConstructor)
     Rectangle rect;
 
     /// check default properties of rectangle
-    EXPECT_EQ(0, rect.x);
-    EXPECT_EQ(0, rect.y);
-    EXPECT_EQ(0, rect.width);
-    EXPECT_EQ(0, rect.height);
+    EXPECT_EQ(0u, rect.x);
+    EXPECT_EQ(0u, rect.y);
+    EXPECT_EQ(0u, rect.width);
+    EXPECT_EQ(0u, rect.height);
 }
 
 TEST(RectangleTest, specialConstructor)
@@ -39,10 +39,10 @@ TEST(RectangleTest, specialConstructor)
     Rectangle rect(1, 2, 3, 4);
 
     /// check specified properties of rectangle
-    EXPECT_EQ(1, rect.x);
-    EXPECT_EQ(2, rect.y);
-    EXPECT_EQ(3, rect.width);
-    EXPECT_EQ(4, rect.height);
+    EXPECT_EQ(1u, rect.x);
+    EXPECT_EQ(2u, rect.y);
+    EXPECT_EQ(3u, rect.width);
+    EXPECT_EQ(4u, rect.height);
 }
 
 TEST(RectangleTest, assignOperator)
index d3c9687..d80f658 100644 (file)
@@ -68,17 +68,17 @@ TEST_F(SurfaceTest, defaultConstructor)
 
     /// make sure, surface has default source rectangle
     const Rectangle& srcRect = surface.getSourceRegion();
-    EXPECT_EQ(0, srcRect.height);
-    EXPECT_EQ(0, srcRect.width);
-    EXPECT_EQ(0, srcRect.x);
-    EXPECT_EQ(0, srcRect.y);
+    EXPECT_EQ(0u, srcRect.height);
+    EXPECT_EQ(0u, srcRect.width);
+    EXPECT_EQ(0u, srcRect.x);
+    EXPECT_EQ(0u, srcRect.y);
 
     /// make sure, surface has default destination rectangle
     const Rectangle& destRect = surface.getDestinationRegion();
-    EXPECT_EQ(0, destRect.height);
-    EXPECT_EQ(0, destRect.width);
-    EXPECT_EQ(0, destRect.x);
-    EXPECT_EQ(0, destRect.y);
+    EXPECT_EQ(0u, destRect.height);
+    EXPECT_EQ(0u, destRect.width);
+    EXPECT_EQ(0u, destRect.x);
+    EXPECT_EQ(0u, destRect.y);
 
     /// make sure, surface has no native content associated
     EXPECT_FALSE(m_pSurface->hasNativeContent());
@@ -113,17 +113,17 @@ TEST_F(SurfaceTest, specialConstructor)
 
     /// make sure, surface has default source rectangle
     const Rectangle& srcRect = surface.getSourceRegion();
-    EXPECT_EQ(0, srcRect.height);
-    EXPECT_EQ(0, srcRect.width);
-    EXPECT_EQ(0, srcRect.x);
-    EXPECT_EQ(0, srcRect.y);
+    EXPECT_EQ(0u, srcRect.height);
+    EXPECT_EQ(0u, srcRect.width);
+    EXPECT_EQ(0u, srcRect.x);
+    EXPECT_EQ(0u, srcRect.y);
 
     /// make sure, surface has default destination rectangle
     const Rectangle& destRect = surface.getDestinationRegion();
-    EXPECT_EQ(0, destRect.height);
-    EXPECT_EQ(0, destRect.width);
-    EXPECT_EQ(0, destRect.x);
-    EXPECT_EQ(0, destRect.y);
+    EXPECT_EQ(0u, destRect.height);
+    EXPECT_EQ(0u, destRect.width);
+    EXPECT_EQ(0u, destRect.x);
+    EXPECT_EQ(0u, destRect.y);
 
     /// make sure, surface has no native content associated
     EXPECT_FALSE(m_pSurface->hasNativeContent());
@@ -256,14 +256,14 @@ TEST_F(SurfaceTest, setNativeContent)
 
     /// make sure, surface has 1st expected native content associated
     EXPECT_TRUE(m_pSurface->hasNativeContent());
-    EXPECT_EQ(expectedNativeHandle1, m_pSurface->getNativeContent());
+    EXPECT_EQ((long)expectedNativeHandle1, m_pSurface->getNativeContent());
 
     /// set 2nd expected native content of surface
     m_pSurface->setNativeContent(expectedNativeHandle2);
 
     /// make sure, surface still has 1st expected native content associated
     EXPECT_TRUE(m_pSurface->hasNativeContent());
-    EXPECT_EQ(expectedNativeHandle1, m_pSurface->getNativeContent());
+    EXPECT_EQ((long)expectedNativeHandle1, m_pSurface->getNativeContent());
 
     /// remove native content of surface
     m_pSurface->removeNativeContent();
@@ -273,7 +273,7 @@ TEST_F(SurfaceTest, setNativeContent)
 
     /// make sure, surface has 2nd expected native content associated
     EXPECT_TRUE(m_pSurface->hasNativeContent());
-    EXPECT_EQ(expectedNativeHandle2, m_pSurface->getNativeContent());
+    EXPECT_EQ((long)expectedNativeHandle2, m_pSurface->getNativeContent());
 }
 
 TEST_F(SurfaceTest, getNativeContent)
@@ -289,7 +289,7 @@ TEST_F(SurfaceTest, getNativeContent)
 
     /// make sure, surface has 1st expected native content associated
     EXPECT_TRUE(m_pSurface->hasNativeContent());
-    EXPECT_EQ(expectedNativeHandle1, m_pSurface->getNativeContent());
+    EXPECT_EQ((long)expectedNativeHandle1, m_pSurface->getNativeContent());
 
     /// remove native content of surface
     m_pSurface->removeNativeContent();
@@ -299,5 +299,5 @@ TEST_F(SurfaceTest, getNativeContent)
 
     /// make sure, surface has 2nd expected native content associated
     EXPECT_TRUE(m_pSurface->hasNativeContent());
-    EXPECT_EQ(expectedNativeHandle2, m_pSurface->getNativeContent());
+    EXPECT_EQ((long)expectedNativeHandle2, m_pSurface->getNativeContent());
 }