Fixed code that would only compile on buggy compilers.
authorJon A. Cruz <jonc@osg.samsung.com>
Thu, 24 Sep 2015 21:24:30 +0000 (14:24 -0700)
committerJon A. Cruz <jonc@osg.samsung.com>
Fri, 25 Sep 2015 17:44:28 +0000 (17:44 +0000)
Corrected lambda capture of member. Caused compilation to fail
on gcc newer than 4.6.

Corrected order of GTest assert macro parameters.

Change-Id: I04f653fb70d9e68ee97df2f68bbaa965513c621f
Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/3057
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
service/notification-manager/NotificationManager/src/unittest/ResourceHostingUnitTest.cpp

index 404c953..483c977 100644 (file)
@@ -87,7 +87,7 @@ TEST_F(ResourceHostingTest, HostingFoundBeforeMakeOriginServer)
 
     std::string uri = "";
     mocks.OnCallFunc(onDiscoveryResource).Do(
-            [this, &uri, &testObject, &discoveryTask](RCSRemoteResourceObject::Ptr ptr)
+            [this, &uri, &testObject](RCSRemoteResourceObject::Ptr ptr)
             {
                 if(ptr->getUri() == testObject->getHostedServerUri())
                 {
@@ -105,7 +105,7 @@ TEST_F(ResourceHostingTest, HostingFoundBeforeMakeOriginServer)
 
     testObject->destroy();
 
-    ASSERT_EQ(uri, mirroredUri);
+    ASSERT_EQ(mirroredUri, uri);
 }
 
 TEST_F(ResourceHostingTest, startHosting)