Fixed warning due to incorrect type and comparison order.
authorJon A. Cruz <jonc@osg.samsung.com>
Sat, 25 Jul 2015 00:32:06 +0000 (17:32 -0700)
committerUze Choi <uzchoi@samsung.com>
Sun, 26 Jul 2015 13:53:53 +0000 (13:53 +0000)
Change-Id: Ifb4a7c644c5599888b74895429eb2296ab2c9f57
Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1900
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/resource-encapsulation/src/resourceBroker/unittest/ResourceBrokerUnitTest.cpp

index 346ef43c795af9052f85c5886e4509f69f013fa8..b1ed893af18c00df8ed9c49184d3f489f29a2b86 100644 (file)
@@ -25,7 +25,7 @@ public:
 
 protected:
 
-    void SetUp() 
+    void SetUp()
     {
         TestWithMock::SetUp();
         brokerInstance = ResourceBroker::getInstance();
@@ -34,7 +34,7 @@ protected:
         id = 0;
     }
 
-    void TearDown() 
+    void TearDown()
     {
         TestWithMock::TearDown();
         pResource.reset();
@@ -50,14 +50,14 @@ protected:
     }
 
 };
+
 TEST_F(ResourceBrokerTest,HostResource_ReturnNormalValueIfNormalParams)
 {
 
     MockingFunc();
 
-    BrokerID ret;
-    ASSERT_NE(ret = brokerInstance->hostResource(pResource,cb),0);
+    BrokerID ret = brokerInstance->hostResource(pResource, cb);
+    ASSERT_NE(BrokerID(0), ret);
 
     brokerInstance->cancelHostResource(ret);
 
@@ -184,4 +184,3 @@ TEST_F(ResourceBrokerTest,getResourceState_NormalErrorHandlingIfAbnormalId)
     ASSERT_THROW(brokerInstance->getResourceState(id),ResourceBroker::InvalidParameterException);
 
 }
-