From: sooyeon.kim Date: Tue, 31 Jul 2018 10:00:11 +0000 (+0900) Subject: Add line coverage tags X-Git-Tag: accepted/tizen/unified/20180810.132630~1^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Ftts.git;a=commitdiff_plain;h=c3e3595e9ff04d62138ba0f50e824c8f282a2725 Add line coverage tags Change-Id: Ibb7a6af4efad3e453810a5c9c99894b17ec63232 Signed-off-by: sooyeon.kim --- diff --git a/client/tts.c b/client/tts.c index 188af5b..3abdc43 100644 --- a/client/tts.c +++ b/client/tts.c @@ -117,6 +117,7 @@ static int __tts_convert_config_error_code(tts_config_error_e code) return code; } +//LCOV_EXCL_START void __tts_config_voice_changed_cb(const char* before_lang, int before_voice_type, const char* language, int voice_type, bool auto_voice, void* user_data) { SLOG(LOG_DEBUG, TAG_TTSC, "Voice changed : Before lang(%s) type(%d) , Current lang(%s), type(%d)", @@ -227,6 +228,7 @@ void _tts_config_engine_changed_cb(const char* engine_id, const char* setting, c } return; } +//LCOV_EXCL_STOP int tts_create(tts_h* tts) { @@ -330,6 +332,7 @@ int tts_destroy(tts_h tts) do { ret = tts_dbus_request_finalize(client->uid); if (0 != ret) { + //LCOV_EXCL_START if (TTS_ERROR_TIMED_OUT != ret) { SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] result : %s", __tts_get_error_code(ret)); break; @@ -342,6 +345,7 @@ int tts_destroy(tts_h tts) break; } } + //LCOV_EXCL_STOP } } while (0 != ret); } else { @@ -383,10 +387,12 @@ int tts_destroy(tts_h tts) return TTS_ERROR_NONE; } +//LCOV_EXCL_START void __tts_screen_reader_changed_cb(bool value) { g_screen_reader = value; } +//LCOV_EXCL_STOP int tts_set_mode(tts_h tts, tts_mode_e mode) { @@ -793,6 +799,7 @@ int tts_unprepare(tts_h tts) do { ret = tts_dbus_request_finalize(client->uid); if (0 != ret) { + //LCOV_EXCL_START if (TTS_ERROR_INVALID_PARAMETER == ret && false == is_prepared) { client->current_state = TTS_STATE_CREATED; if (0 == tts_prepare_sync(tts)) { @@ -811,6 +818,7 @@ int tts_unprepare(tts_h tts) break; } } + //LCOV_EXCL_STOP } } while (0 != ret); } else { @@ -1204,6 +1212,7 @@ int tts_add_text(tts_h tts, const char* text, const char* language, int voice_ty while (0 != ret) { ret = tts_dbus_request_add_text(client->uid, text, temp, voice_type, speed, client->current_utt_id, client->credential); if (0 != ret) { + //LCOV_EXCL_START if (TTS_ERROR_INVALID_PARAMETER == ret && false == is_prepared) { client->current_state = TTS_STATE_CREATED; if (0 == tts_prepare_sync(tts)) { @@ -1222,6 +1231,7 @@ int tts_add_text(tts_h tts, const char* text, const char* language, int voice_ty break; } } + //LCOV_EXCL_STOP } else { *utt_id = client->current_utt_id; } @@ -1389,6 +1399,7 @@ int tts_play(tts_h tts) while (0 != ret) { ret = tts_dbus_request_play(client->uid, client->credential); if (0 != ret) { + //LCOV_EXCL_START if (TTS_ERROR_INVALID_PARAMETER == ret && false == is_prepared) { client->current_state = TTS_STATE_CREATED; if (0 == tts_prepare_sync(tts)) { @@ -1407,6 +1418,7 @@ int tts_play(tts_h tts) return ret; } } + //LCOV_EXCL_STOP } } @@ -1565,6 +1577,7 @@ int tts_stop(tts_h tts) while (0 != ret) { ret = tts_dbus_request_stop(client->uid); if (0 != ret) { + //LCOV_EXCL_START if (TTS_ERROR_INVALID_PARAMETER == ret && false == is_prepared) { client->current_state = TTS_STATE_CREATED; if (0 == tts_prepare_sync(tts)) { @@ -1583,6 +1596,7 @@ int tts_stop(tts_h tts) return ret; } } + //LCOV_EXCL_STOP } } @@ -1743,6 +1757,7 @@ int tts_pause(tts_h tts) while (0 != ret) { ret = tts_dbus_request_pause(client->uid); if (0 != ret) { + //LCOV_EXCL_START if (TTS_ERROR_INVALID_PARAMETER == ret && false == is_prepared) { client->current_state = TTS_STATE_CREATED; if (0 == tts_prepare_sync(tts)) { @@ -1761,6 +1776,7 @@ int tts_pause(tts_h tts) return ret; } } + //LCOV_EXCL_STOP } } @@ -1820,6 +1836,7 @@ int tts_set_private_data(tts_h tts, const char* key, const char* data) while (0 != ret) { ret = tts_dbus_request_set_private_data(client->uid, key, data); if (0 != ret) { + //LCOV_EXCL_START if (TTS_ERROR_INVALID_PARAMETER == ret && false == is_prepared) { client->current_state = TTS_STATE_CREATED; if (0 == tts_prepare_sync(tts)) { @@ -1838,6 +1855,7 @@ int tts_set_private_data(tts_h tts, const char* key, const char* data) return ret; } } + //LCOV_EXCL_STOP } } @@ -1882,6 +1900,7 @@ int tts_get_private_data(tts_h tts, const char* key, char** data) while (0 != ret) { ret = tts_dbus_request_get_private_data(client->uid, key, data); if (0 != ret) { + //LCOV_EXCL_START if (TTS_ERROR_INVALID_PARAMETER == ret && false == is_prepared) { client->current_state = TTS_STATE_CREATED; if (0 == tts_prepare_sync(tts)) { @@ -1900,6 +1919,7 @@ int tts_get_private_data(tts_h tts, const char* key, char** data) return ret; } } + //LCOV_EXCL_STOP } } @@ -1913,6 +1933,7 @@ int tts_get_private_data(tts_h tts, const char* key, char** data) return 0; } +//LCOV_EXCL_START static Eina_Bool __tts_notify_error(void *data) { tts_h tts = (tts_h)data; @@ -2073,6 +2094,7 @@ int __tts_cb_set_state(int uid, int state) return 0; } +//LCOV_EXCL_STOP int __tts_cb_utt_started(int uid, int utt_id) { @@ -2709,6 +2731,7 @@ int tts_stop_pcm(tts_h tts) return TTS_ERROR_NONE; } +//LCOV_EXCL_STOP int tts_repeat(tts_h tts, char** text_repeat, int* utt_id) { @@ -2802,4 +2825,3 @@ int tts_repeat(tts_h tts, char** text_repeat, int* utt_id) return TTS_ERROR_NONE; } -//LCOV_EXCL_STOP diff --git a/client/tts_client.c b/client/tts_client.c index 4ce1855..94a713d 100644 --- a/client/tts_client.c +++ b/client/tts_client.c @@ -240,6 +240,7 @@ int tts_client_get_use_callback(tts_client_s* client) return client->cb_ref_count; } +//LCOV_EXCL_START int tts_client_get_connected_client_count() { GList *iter = NULL; @@ -290,3 +291,4 @@ GList* tts_client_get_client_list() { return g_client_list; } +//LCOV_EXCL_STOP diff --git a/client/tts_dbus.c b/client/tts_dbus.c index d1c1953..25b9106 100644 --- a/client/tts_dbus.c +++ b/client/tts_dbus.c @@ -962,6 +962,7 @@ int tts_dbus_request_pause(int uid) return result; } +//LCOV_EXCL_START int tts_dbus_request_play_pcm(int uid) { DBusMessage* msg; @@ -1143,3 +1144,4 @@ int tts_dbus_request_add_pcm(int uid, int event, const char* data, int data_size return result; } +// LCOV_EXCL_STOP