From: Jooseok Park Date: Tue, 31 Jan 2017 04:08:43 +0000 (+0900) Subject: [UTC][iotcon][NON-ACR][Add check feature] X-Git-Tag: 4.0_Bringup~78 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8e8746aacbd96b2ee2ddda254f704ce57980634c;p=test%2Ftct%2Fnative%2Fapi.git [UTC][iotcon][NON-ACR][Add check feature] Change-Id: Ie787d43c9da34f38213f17369d287f22475c593e --- diff --git a/src/utc/iotcon/utc-iotcon.c b/src/utc/iotcon/utc-iotcon.c index a23c0a4c7..628af5340 100644 --- a/src/utc/iotcon/utc-iotcon.c +++ b/src/utc/iotcon/utc-iotcon.c @@ -387,7 +387,15 @@ static void cb2(const char *pin, void *user_data) */ int utc_iotcon_add_generated_pin_cb_n(void) { - int ret = iotcon_add_generated_pin_cb(NULL, NULL); + int ret; + + if (false == g_feature) { + ret = iotcon_add_generated_pin_cb(NULL, NULL); + ICUTC_ASSERT_EQ(ret, IOTCON_ERROR_NOT_SUPPORTED); + return 0; + } + + ret = iotcon_add_generated_pin_cb(NULL, NULL); ICUTC_ASSERT_EQ(ret, IOTCON_ERROR_INVALID_PARAMETER); return 0; } @@ -399,7 +407,15 @@ int utc_iotcon_add_generated_pin_cb_n(void) */ int utc_iotcon_add_generated_pin_cb_p(void) { - int ret = iotcon_add_generated_pin_cb(cb1, NULL); + int ret; + + if (false == g_feature) { + ret = iotcon_add_generated_pin_cb(cb1, NULL); + ICUTC_ASSERT_EQ(ret, IOTCON_ERROR_NOT_SUPPORTED); + return 0; + } + + ret = iotcon_add_generated_pin_cb(cb1, NULL); ICUTC_ASSERT_EQ(ret, 0); return 0; } @@ -411,8 +427,16 @@ int utc_iotcon_add_generated_pin_cb_p(void) */ int utc_iotcon_remove_generated_pin_cb_n(void) { + int ret; + + if (false == g_feature) { + ret = iotcon_remove_generated_pin_cb(cb2); + ICUTC_ASSERT_EQ(ret, IOTCON_ERROR_NOT_SUPPORTED); + return 0; + } + iotcon_add_generated_pin_cb(cb1, NULL); - int ret = iotcon_remove_generated_pin_cb(cb2); + ret = iotcon_remove_generated_pin_cb(cb2); ICUTC_ASSERT_EQ(ret, IOTCON_ERROR_NO_DATA); return 0; } @@ -424,8 +448,16 @@ int utc_iotcon_remove_generated_pin_cb_n(void) */ int utc_iotcon_remove_generated_pin_cb_p(void) { + int ret; + + if (false == g_feature) { + ret = iotcon_remove_generated_pin_cb(cb1); + ICUTC_ASSERT_EQ(ret, IOTCON_ERROR_NOT_SUPPORTED); + return 0; + } + iotcon_add_generated_pin_cb(cb1, NULL); - int ret = iotcon_remove_generated_pin_cb(cb1); + ret = iotcon_remove_generated_pin_cb(cb1); ICUTC_ASSERT_EQ(ret, 0); return 0; }