[RE] Added print statement in the rcs_common_test for fixing mocking crash.
authorJay Sharma <jay.sharma@samsung.com>
Wed, 14 Jun 2017 12:26:04 +0000 (17:56 +0530)
committerUze Choi <uzchoi@samsung.com>
Tue, 20 Jun 2017 09:01:26 +0000 (09:01 +0000)
There is a crash on the specific ubuntu 16.04 [64-bit]version, while running the
rcs_common_test. Added the print statement to fix it,

Issue seems to be of mocking framework support for 16.04 [64-bit] as same code
is working on 14.04 [32-bit and 64-bit].
Moreover, I tried to remove the print statement in other services mocking calls
it also results in the crash.

bug: https://jira.iotivity.org/browse/IOT-2416
Change-Id: Ic848e889aa3985567dad2d88b4945efdcd0733fd
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20803
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
service/resource-encapsulation/src/common/primitiveResource/unittests/PrimitiveResourceTest.cpp

index bbed88c..c51f2d2 100644 (file)
@@ -185,8 +185,10 @@ public:
     typedef OCStackResult (*FindResource)(const std::string&, const std::string&,
             OCConnectivityType, OC::FindCallback);
 
-public:
-    static void discovered(std::shared_ptr< PrimitiveResource >) {}
+    static void discovered(std::shared_ptr< PrimitiveResource >)
+    {
+        std::cout << __func__ << std::endl;
+    }
 };
 
 TEST_F(DiscoverResourceTest, CallbackIsInvokedWhenResourceIsDiscovered)