diff options
author | pr.jung <pr.jung@samsung.com> | 2018-05-11 16:49:44 +0900 |
---|---|---|
committer | pr.jung <pr.jung@samsung.com> | 2018-05-11 16:52:02 +0900 |
commit | dfb96281565e232d1dcff70a49de9b6b8498a83d (patch) | |
tree | 470da384af9cc0539a7f501071d1cbf1665cdcf9 | |
parent | 7d8ee779a6aea5d3dd239af259c15b5c83970c45 (diff) | |
download | libsvi-dfb96281565e232d1dcff70a49de9b6b8498a83d.tar.gz libsvi-dfb96281565e232d1dcff70a49de9b6b8498a83d.tar.bz2 libsvi-dfb96281565e232d1dcff70a49de9b6b8498a83d.zip |
Patch for line coveragesubmit/tizen/20180511.075636accepted/tizen/unified/20180514.094129
Change-Id: I8152acfad4385fa91e074d90b2e58610e0b500c4
Signed-off-by: pr.jung <pr.jung@samsung.com>
-rw-r--r-- | src/check.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/check.c b/src/check.c index 198cf78..fe5df86 100644 --- a/src/check.c +++ b/src/check.c @@ -276,10 +276,12 @@ static profile_e get_profile(void) len = strlen(profile) + 1; if (!strncmp(PROFILE_MOBILE_STRING, profile, len)) set = PROFILE_MOBILE; +//LCOV_EXCL_START else if (!strncmp(PROFILE_WEARABLE_STRING, profile, len)) set = PROFILE_WEARABLE; else set = PROFILE_COMMON; +//LCOV_EXCL_STOP free(profile); return set; @@ -296,10 +298,12 @@ static char *profile_get_name() if (prof == PROFILE_MOBILE) profile_name = PROFILE_MOBILE_STRING; +//LCOV_EXCL_START else if (prof == PROFILE_WEARABLE) profile_name = PROFILE_WEARABLE_STRING; else profile_name = PROFILE_COMMON_STRING; +//LCOV_EXCL_STOP return profile_name; } @@ -313,10 +317,12 @@ static int profile_get_num_of_pattern() if (prof == PROFILE_MOBILE) return ARR_SIZE(mobile_str_pattern); +//LCOV_EXCL_START else if (prof == PROFILE_WEARABLE) return ARR_SIZE(wearable_str_pattern); else return ARR_SIZE(common_str_pattern); +//LCOV_EXCL_STOP } static const char *profile_str_pattern(int pattern) @@ -331,6 +337,7 @@ static const char *profile_str_pattern(int pattern) if (pattern == mobile_str_pattern[i].id) return mobile_str_pattern[i].string; } +//LCOV_EXCL_START } else if (prof == PROFILE_WEARABLE) { for (i = 0; i < profile_get_num_of_pattern(); i++) { if (pattern == wearable_str_pattern[i].id) @@ -342,6 +349,7 @@ static const char *profile_str_pattern(int pattern) return common_str_pattern[i].string; } } +//LCOV_EXCL_STOP return ""; } @@ -360,6 +368,7 @@ static int profile_get_pattern_enum(char *pattern) if (!strncmp(pattern, mobile_str_pattern[i].string, len)) return mobile_str_pattern[i].id; } +//LCOV_EXCL_START } else if (prof == PROFILE_WEARABLE) { for (i = 0; i < profile_get_num_of_pattern(); i++) { if (!strncmp(pattern, wearable_str_pattern[i].string, len)) @@ -371,6 +380,7 @@ static int profile_get_pattern_enum(char *pattern) return common_str_pattern[i].id; } } +//LCOV_EXCL_STOP return -1; } @@ -568,10 +578,12 @@ static bool profile_is_notification_type(int pattern) if (prof == PROFILE_MOBILE) return mobile_is_notification_type(pattern); +//LCOV_EXCL_START else if (prof == PROFILE_WEARABLE) return wearable_is_notification_type(pattern); else return false; +//LCOV_EXCL_STOP } static int mobile_get_priority(int pattern) @@ -654,6 +666,7 @@ static bool mobile_get_always_alert_case(int type, int pattern) return false; } +//LCOV_EXCL_START static bool wearable_get_always_alert_case(int type, int pattern) { if (CHECK_SOUND(type)) { @@ -712,7 +725,9 @@ static bool wearable_get_always_alert_case(int type, int pattern) } return false; } +//LCOV_EXCL_STOP +//LCOV_EXCL_START static bool common_get_always_alert_case(int type, int pattern) { switch (pattern) { @@ -728,6 +743,7 @@ static bool common_get_always_alert_case(int type, int pattern) } return false; } +//LCOV_EXCL_STOP static bool profile_get_always_alert_case(int type, int pattern) { @@ -737,10 +753,12 @@ static bool profile_get_always_alert_case(int type, int pattern) if (prof == PROFILE_MOBILE) return mobile_get_always_alert_case(type, pattern); +//LCOV_EXCL_START else if (prof == PROFILE_WEARABLE) return wearable_get_always_alert_case(type, pattern); else return common_get_always_alert_case(type, pattern); +//LCOV_EXCL_STOP } static bool mobile_get_always_off_case(int type, int pattern) @@ -781,6 +799,7 @@ static bool mobile_get_always_off_case(int type, int pattern) return false; } +//LCOV_EXCL_START static bool wearable_is_system_type(int pattern) { switch (pattern) { @@ -834,7 +853,9 @@ static bool wearable_get_always_off_case(int type, int pattern) } return false; } +//LCOV_EXCL_STOP +//LCOV_EXCL_START static bool common_get_always_off_case(int type, int pattern) { switch (pattern) { @@ -852,6 +873,7 @@ static bool common_get_always_off_case(int type, int pattern) } return false; } +//LCOV_EXCL_STOP static bool profile_get_always_off_case(int type, int pattern) { @@ -861,10 +883,12 @@ static bool profile_get_always_off_case(int type, int pattern) if (prof == PROFILE_MOBILE) return mobile_get_always_off_case(type, pattern); +//LCOV_EXCL_START else if (prof == PROFILE_WEARABLE) return wearable_get_always_off_case(type, pattern); else return common_get_always_off_case(type, pattern); +//LCOV_EXCL_STOP } static int mobile_get_strength_type(int type, int pattern) @@ -891,6 +915,7 @@ static int mobile_get_strength_type(int type, int pattern) return -EINVAL; } +//LCOV_EXCL_START static int wearable_get_strength_type(int type, int pattern) { if (CHECK_SOUND(type)) { @@ -918,7 +943,9 @@ static int wearable_get_strength_type(int type, int pattern) } return -EINVAL; } +//LCOV_EXCL_STOP +//LCOV_EXCL_START static int common_get_strength_type(int type, int pattern) { if (CHECK_SOUND(type)) { @@ -936,6 +963,7 @@ static int common_get_strength_type(int type, int pattern) return -EINVAL; } +//LCOV_EXCL_STOP static int profile_get_strength_type(int type, int pattern) { @@ -945,10 +973,12 @@ static int profile_get_strength_type(int type, int pattern) if (prof == PROFILE_MOBILE) return mobile_get_strength_type(type, pattern); +//LCOV_EXCL_START else if (prof == PROFILE_WEARABLE) return wearable_get_strength_type(type, pattern); else return common_get_strength_type(type, pattern); +//LCOV_EXCL_STOP } static const struct profile_ops feedback_profile_ops = { |