From: KIM JungYong Date: Mon, 22 Aug 2016 02:03:59 +0000 (+0900) Subject: Fix build fail of consumer unittest. X-Git-Tag: 1.2.0+RC1~79 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e8640e6100da4f6eccc996720db41d2db5fab1ea;p=platform%2Fupstream%2Fiotivity.git Fix build fail of consumer unittest. When notification service build, before unittest is commented why unittest has fail case and build error. Fail case is resolved other patch by Jaesick.shin. In this patch, build error is fixed. Change-Id: Id5a588f719ae8b6eb1ac78bf987dd793da208c14 Signed-off-by: KIM JungYong Reviewed-on: https://gerrit.iotivity.org/gerrit/10707 Tested-by: jenkins-iotivity Reviewed-by: Uze Choi --- diff --git a/service/notification/SConscript b/service/notification/SConscript index a86fe421e..d9fc82007 100755 --- a/service/notification/SConscript +++ b/service/notification/SConscript @@ -113,8 +113,8 @@ notification_env.UserInstallTargetHeader('include/NSConsumerInterface.h',\ 'service/notification', 'NSConsumerInterface.h') # Go to build Unit test -#if target_os == 'linux': -# SConscript('unittest/SConscript') +if target_os == 'linux': + SConscript('unittest/SConscript') # Go to build sample apps SConscript('examples/SConscript') diff --git a/service/notification/unittest/NSConsumerTest.cpp b/service/notification/unittest/NSConsumerTest.cpp index 6f2378613..d60d7d84b 100644 --- a/service/notification/unittest/NSConsumerTest.cpp +++ b/service/notification/unittest/NSConsumerTest.cpp @@ -104,7 +104,7 @@ public: std::cout << __func__ << std::endl; } - static void NSSubscriptionAcceptedCallback(NSProvider *) + static void NSProviderChangedCallback(NSProvider *, NSResponse) { std::cout << __func__ << std::endl; } @@ -152,7 +152,7 @@ TEST_F(NotificationConsumerTest, StartConsumerPositive) { NSConsumerConfig cfg; cfg.discoverCb = NSProviderDiscoveredCallbackEmpty; - cfg.acceptedCb = NSSubscriptionAcceptedCallback; + cfg.changedCb = NSProviderChangedCallback; cfg.messageCb = NSNotificationReceivedCallbackEmpty; cfg.syncInfoCb = NSSyncCallbackEmpty; EXPECT_EQ(NS_OK, NSStartConsumer(cfg)); @@ -174,7 +174,7 @@ TEST_F(NotificationConsumerTest, DiscoverProviderWithNonAccepterWhenStartedConsu NSConsumerConfig cfg; cfg.discoverCb = NSProviderDiscoveredCallbackEmpty; - cfg.acceptedCb = NSSubscriptionAcceptedCallback; + cfg.changedCb = NSProviderChangedCallback; cfg.messageCb = NSNotificationReceivedCallbackEmpty; cfg.syncInfoCb = NSSyncCallbackEmpty; NSStartConsumer(cfg); @@ -208,7 +208,7 @@ TEST_F(NotificationConsumerTest, DiscoverProviderWithNonAccepterWhenStartedConsu NSConsumerConfig cfg; cfg.discoverCb = NSProviderDiscoveredCallbackEmpty; - cfg.acceptedCb = NSSubscriptionAcceptedCallback; + cfg.changedCb = NSProviderChangedCallback; cfg.messageCb = NSNotificationReceivedCallbackEmpty; cfg.syncInfoCb = NSSyncCallbackEmpty; NSStartConsumer(cfg); @@ -283,7 +283,7 @@ TEST_F(NotificationConsumerTest, ExpectReceiveNotificationWithAccepterisProvider NSConsumerConfig cfg; cfg.discoverCb = NSProviderDiscoveredCallbackEmpty; - cfg.acceptedCb = NSSubscriptionAcceptedCallback; + cfg.changedCb = NSProviderChangedCallback; cfg.messageCb = NSNotificationReceivedCallbackEmpty; cfg.syncInfoCb = NSSyncCallbackEmpty; NSStartConsumer(cfg);