From 19719691c3f731d7d2089ce2063608c05d328ff2 Mon Sep 17 00:00:00 2001 From: Jay Sharma Date: Wed, 14 Jun 2017 17:56:04 +0530 Subject: [PATCH] [RE] Added print statement in the rcs_common_test for fixing mocking crash. 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 Reviewed-on: https://gerrit.iotivity.org/gerrit/20803 Tested-by: jenkins-iotivity Reviewed-by: Ashok Babu Channa Reviewed-by: Phil Coval --- .../common/primitiveResource/unittests/PrimitiveResourceTest.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/service/resource-encapsulation/src/common/primitiveResource/unittests/PrimitiveResourceTest.cpp b/service/resource-encapsulation/src/common/primitiveResource/unittests/PrimitiveResourceTest.cpp index bbed88c..c51f2d2 100644 --- a/service/resource-encapsulation/src/common/primitiveResource/unittests/PrimitiveResourceTest.cpp +++ b/service/resource-encapsulation/src/common/primitiveResource/unittests/PrimitiveResourceTest.cpp @@ -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) -- 2.7.4