From: pr.jung Date: Thu, 14 Jul 2016 07:48:41 +0000 (+0900) Subject: Add comments for line/function coverage analysis X-Git-Tag: accepted/tizen/common/20160721.180513~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=58c76943d115f15d5fb88c750681b90f16264a55;p=platform%2Fcore%2Fsystem%2Flibsvi.git Add comments for line/function coverage analysis Change-Id: I25a9b6fa219068a23c547d2ab1af851170d68a86 Signed-off-by: pr.jung --- diff --git a/mobile/src/check.c b/mobile/src/check.c index 6f06d44..96f9c9e 100644 --- a/mobile/src/check.c +++ b/mobile/src/check.c @@ -129,6 +129,7 @@ static int vib_level; static int noti_level; static int feedbackstatus; +//LCOV_EXCL_START Not called Callback static void feedback_callstatus_cb(keynode_t *key, void* data) { callstatus = vconf_keynode_get_int(key); @@ -163,40 +164,41 @@ static void feedback_feedbackstatus_cb(keynode_t *key, void* data) { feedbackstatus = vconf_keynode_get_bool(key); } +//LCOV_EXCL_STOP static void mobile_init(void) { /* check call status */ if (vconf_get_int(VCONFKEY_CALL_STATE, &callstatus) < 0) - _W("VCONFKEY_CALL_STATE ==> FAIL!!"); + _W("VCONFKEY_CALL_STATE ==> FAIL!!"); //LCOV_EXCL_LINE if (vconf_get_bool(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL, &lock_sndstatus) < 0) - _W("VCONFKEY_SETAPPL_SOUND_LOCK_BOOL ==> FAIL!!"); + _W("VCONFKEY_SETAPPL_SOUND_LOCK_BOOL ==> FAIL!!"); //LCOV_EXCL_LINE /* check camera status */ if (vconf_get_int(VCONFKEY_CAMERA_STATE, &camerastatus) < 0) - _W("VCONFKEY_CAMERA_STATE ==> FAIL!!"); + _W("VCONFKEY_CAMERA_STATE ==> FAIL!!"); //LCOV_EXCL_LINE /* shutter sound policy */ /* This vconf is read just once, because this value is not changed in running time. */ if (vconf_get_int(VCONFKEY_CAMERA_SHUTTER_SOUND_POLICY, &shutter_sndstatus) < 0) - _W("VCONFKEY_CAMERA_SHUTTER_SOUND_POLICY ==> FAIL!!"); + _W("VCONFKEY_CAMERA_SHUTTER_SOUND_POLICY ==> FAIL!!"); //LCOV_EXCL_LINE /* check vibration status */ if (vconf_get_bool(VCONFKEY_SETAPPL_VIBRATE_WHEN_NOTIFICATION_BOOL, ¬i_vibstatus) < 0) - _W("VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL ==> FAIL!!"); + _W("VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL ==> FAIL!!"); //LCOV_EXCL_LINE /* check vib_level */ if (vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, &vib_level) < 0) - _W("VCONFKEY_FEEDBACK_VIBRATION_LEVEL_INT ==> FAIL!!"); + _W("VCONFKEY_FEEDBACK_VIBRATION_LEVEL_INT ==> FAIL!!"); //LCOV_EXCL_LINE /* check noti_level */ if (vconf_get_int(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, ¬i_level) < 0) - _W("VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT ==> FAIL!!"); + _W("VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT ==> FAIL!!"); //LCOV_EXCL_LINE /* feedback Init */ if (vconf_get_bool(VCONFKEY_SETAPPL_HAPTIC_FEEDBACK_STATUS_BOOL, &feedbackstatus) < 0) - _W("VCONFKEY_SETAPPL_HAPTIC_FEEDBACK_STATUS_BOOL ==> FAIL!!"); + _W("VCONFKEY_SETAPPL_HAPTIC_FEEDBACK_STATUS_BOOL ==> FAIL!!"); //LCOV_EXCL_LINE /* add watch for status value */ vconf_notify_key_changed(VCONFKEY_CALL_STATE, feedback_callstatus_cb, NULL); @@ -229,7 +231,7 @@ static bool mobile_get_switched_pattern(int pattern, int *switched) return false; /* in case of call connected or connecting */ - _D("Call status is connected or connecting."); + _D("Call status is connected or connecting."); //LCOV_EXCL_LINE if (pattern == FEEDBACK_PATTERN_MESSAGE) *switched = FEEDBACK_PATTERN_MOBILE_MESSAGE_ON_CALL; else if (pattern == FEEDBACK_PATTERN_EMAIL) @@ -319,12 +321,12 @@ static bool mobile_get_always_off_case(int type, int pattern) /* check if the state of voice recorder is recording */ if (vconf_get_int(VCONFKEY_RECORDER_STATE, &ret) < 0) { - _W("fail to get media sound status, status will be zero"); + _W("fail to get media sound status, status will be zero"); //LCOV_EXCL_LINE ret = 0; } if (CHECK_SOUND(type) && ret == VCONFKEY_RECORDER_STATE_RECORDING) { - _D("voice recording status is RECORDING"); + _D("voice recording status is RECORDING"); //LCOV_EXCL_LINE return true; } diff --git a/src/feedback.c b/src/feedback.c index 555123b..6b08557 100644 --- a/src/feedback.c +++ b/src/feedback.c @@ -275,7 +275,6 @@ API int feedback_is_supported_pattern(feedback_type_e type, feedback_pattern_e p return FEEDBACK_ERROR_NONE; } -//LCOV_EXCL_START Internal APIs. TODO Will make iUTC /* Internal APIs */ API int feedback_play_type_by_name(char *type, char *pattern) { @@ -370,7 +369,7 @@ API int feedback_set_resource_path(feedback_type_e type, feedback_pattern_e patt } if (type == FEEDBACK_TYPE_VIBRATION) { - _E("Not supported type"); + _E("Not supported type"); //LCOV_EXCL_LINE return FEEDBACK_ERROR_NOT_SUPPORTED; } @@ -384,4 +383,3 @@ API int feedback_set_resource_path(feedback_type_e type, feedback_pattern_e patt return FEEDBACK_ERROR_NONE; } -//LCOV_EXCL_STOP diff --git a/src/sound.c b/src/sound.c index 131a22c..9d42f94 100644 --- a/src/sound.c +++ b/src/sound.c @@ -194,7 +194,6 @@ static int sound_is_supported(feedback_pattern_e pattern, bool *supported) return 0; } -//LCOV_EXCL_START Not used function-Internal APIs TODO Will make iUTC static int sound_get_path(feedback_pattern_e pattern, char *buf, unsigned int buflen) { char *cur_path; @@ -242,7 +241,6 @@ static int sound_set_path(feedback_pattern_e pattern, char *path) profile->str_pattern[pattern], path); return 0; } -//LCOV_EXCL_STOP static const struct device_ops sound_device_ops = { .type = FEEDBACK_TYPE_SOUND, diff --git a/src/vibrator.c b/src/vibrator.c index 48cd3c2..3a56824 100644 --- a/src/vibrator.c +++ b/src/vibrator.c @@ -235,7 +235,7 @@ static int vibrator_play(feedback_pattern_e pattern) if (pattern <= FEEDBACK_PATTERN_NONE || pattern >= profile->max_pattern) { - _E("Not supported vibration pattern"); + _E("Not supported vibration pattern"); //LCOV_EXCL_LINE return -ENOTSUP; } @@ -248,7 +248,7 @@ static int vibrator_play(feedback_pattern_e pattern) data = trim_str(temp); if (!data) { free(temp); - _E("Not supported vibration pattern"); + _E("Not supported vibration pattern"); //LCOV_EXCL_LINE return -ENOTSUP; } @@ -317,7 +317,7 @@ static int vibrator_is_supported(int pattern, bool *supported) if (pattern <= FEEDBACK_PATTERN_NONE || pattern >= profile->max_pattern) { - _E("Not supported vibration pattern"); + _E("Not supported vibration pattern"); //LCOV_EXCL_LINE *supported = false; return 0; } @@ -334,7 +334,7 @@ static int vibrator_is_supported(int pattern, bool *supported) ret = haptic_is_supported(data); free(temp); if (ret < 0) { - _E("fail to get support information"); + _E("fail to get support information"); //LCOV_EXCL_LINE if (ret == -ECOMM) return ret; return -EPERM; @@ -345,7 +345,6 @@ static int vibrator_is_supported(int pattern, bool *supported) return 0; } -//LCOV_EXCL_START Not used function-Internal APIs TODO Will make iUTC static int vibrator_get_path(feedback_pattern_e pattern, char *buf, unsigned int buflen) { return 0; @@ -355,7 +354,6 @@ static int vibrator_set_path(feedback_pattern_e pattern, char *path) { return 0; } -//LCOV_EXCL_STOP static const struct device_ops vibrator_device_ops = { .type = FEEDBACK_TYPE_VIBRATION,