[UTC][tts][ACR-1779] Add new TCs for testing playing mode and pcm callback functions 87/296787/3
authorwn.jang <wn.jang@samsung.com>
Fri, 4 Aug 2023 07:43:03 +0000 (16:43 +0900)
committerwn.jang <wn.jang@samsung.com>
Mon, 7 Aug 2023 06:08:38 +0000 (15:08 +0900)
Change-Id: Id2c13b33f27a4cf8ace93ddc26b209001c5eb448

src/utc/tts/public.list
src/utc/tts/tct-tts-core_mobile.h
src/utc/tts/tct-tts-core_tizeniot.h
src/utc/tts/tct-tts-core_tv.h
src/utc/tts/tct-tts-core_wearable.h
src/utc/tts/utc-tts.c

index 03f78a022d4e5f429589689b01a456264b75c77e..b86f3efc5a2799814184e034f985b27c5cc553d3 100755 (executable)
@@ -47,3 +47,6 @@ ttse_set_private_data_set_cb
 ttse_set_private_data_requested_cb
 ttse_get_activated_mode
 ttse_set_activated_mode_changed_cb
+tts_set_synthesized_pcm_cb
+tts_unset_synthesized_pcm_cb
+tts_set_playing_mode
\ No newline at end of file
index e39e0bb18f3608ffb3b01f3b409542677e73ce5b..d5864d5702b8b461e9b3e09980faec1c47dad5f4 100755 (executable)
@@ -182,6 +182,17 @@ extern int utc_tts_unset_service_state_changed_cb_p(void);
 extern int utc_tts_unset_service_state_changed_cb_n(void);
 extern int utc_tts_unset_service_state_changed_cb_n2(void);
 extern int utc_tts_unset_service_state_changed_cb_n3(void);
+extern int utc_tts_set_synthesized_pcm_cb_p(void);
+extern int utc_tts_set_synthesized_pcm_cb_n(void);
+extern int utc_tts_set_synthesized_pcm_cb_n1(void);
+extern int utc_tts_set_synthesized_pcm_cb_n2(void);
+extern int utc_tts_unset_synthesized_pcm_cb_p(void);
+extern int utc_tts_unset_synthesized_pcm_cb_n(void);
+extern int utc_tts_unset_synthesized_pcm_cb_n1(void);
+extern int utc_tts_set_playing_mode_p(void);
+extern int utc_tts_set_playing_mode_p1(void);
+extern int utc_tts_set_playing_mode_n(void);
+extern int utc_tts_set_playing_mode_n1(void);
 extern int utc_ttse_main_p(void);
 extern int utc_ttse_main_n(void);
 extern int utc_ttse_main_n1(void);
@@ -363,6 +374,17 @@ testcase tc_array[] = {
        {"utc_tts_unset_service_state_changed_cb_n",utc_tts_unset_service_state_changed_cb_n,utc_tts_startup,utc_tts_cleanup},
        {"utc_tts_unset_service_state_changed_cb_n2",utc_tts_unset_service_state_changed_cb_n2,utc_tts_startup,utc_tts_cleanup},
        {"utc_tts_unset_service_state_changed_cb_n3",utc_tts_unset_service_state_changed_cb_n3,utc_tts_startup,utc_tts_cleanup},
+       {"utc_tts_set_synthesized_pcm_cb_p", utc_tts_set_synthesized_pcm_cb_p, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_synthesized_pcm_cb_n", utc_tts_set_synthesized_pcm_cb_n, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_synthesized_pcm_cb_n1", utc_tts_set_synthesized_pcm_cb_n1, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_synthesized_pcm_cb_n2", utc_tts_set_synthesized_pcm_cb_n2, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_unset_synthesized_pcm_cb_p", utc_tts_unset_synthesized_pcm_cb_p, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_unset_synthesized_pcm_cb_n", utc_tts_unset_synthesized_pcm_cb_n, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_unset_synthesized_pcm_cb_n1", utc_tts_unset_synthesized_pcm_cb_n1, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_playing_mode_p", utc_tts_set_playing_mode_p, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_playing_mode_p1", utc_tts_set_playing_mode_p1, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_playing_mode_n", utc_tts_set_playing_mode_n, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_playing_mode_n1", utc_tts_set_playing_mode_n1, utc_tts_startup, utc_tts_cleanup},
        {"utc_ttse_main_p",utc_ttse_main_p,utc_ttse_startup,utc_ttse_cleanup},
        {"utc_ttse_main_n",utc_ttse_main_n,utc_ttse_startup,utc_ttse_cleanup},
        {"utc_ttse_main_n1",utc_ttse_main_n1,utc_ttse_startup,utc_ttse_cleanup},
index e39e0bb18f3608ffb3b01f3b409542677e73ce5b..d5864d5702b8b461e9b3e09980faec1c47dad5f4 100755 (executable)
@@ -182,6 +182,17 @@ extern int utc_tts_unset_service_state_changed_cb_p(void);
 extern int utc_tts_unset_service_state_changed_cb_n(void);
 extern int utc_tts_unset_service_state_changed_cb_n2(void);
 extern int utc_tts_unset_service_state_changed_cb_n3(void);
+extern int utc_tts_set_synthesized_pcm_cb_p(void);
+extern int utc_tts_set_synthesized_pcm_cb_n(void);
+extern int utc_tts_set_synthesized_pcm_cb_n1(void);
+extern int utc_tts_set_synthesized_pcm_cb_n2(void);
+extern int utc_tts_unset_synthesized_pcm_cb_p(void);
+extern int utc_tts_unset_synthesized_pcm_cb_n(void);
+extern int utc_tts_unset_synthesized_pcm_cb_n1(void);
+extern int utc_tts_set_playing_mode_p(void);
+extern int utc_tts_set_playing_mode_p1(void);
+extern int utc_tts_set_playing_mode_n(void);
+extern int utc_tts_set_playing_mode_n1(void);
 extern int utc_ttse_main_p(void);
 extern int utc_ttse_main_n(void);
 extern int utc_ttse_main_n1(void);
@@ -363,6 +374,17 @@ testcase tc_array[] = {
        {"utc_tts_unset_service_state_changed_cb_n",utc_tts_unset_service_state_changed_cb_n,utc_tts_startup,utc_tts_cleanup},
        {"utc_tts_unset_service_state_changed_cb_n2",utc_tts_unset_service_state_changed_cb_n2,utc_tts_startup,utc_tts_cleanup},
        {"utc_tts_unset_service_state_changed_cb_n3",utc_tts_unset_service_state_changed_cb_n3,utc_tts_startup,utc_tts_cleanup},
+       {"utc_tts_set_synthesized_pcm_cb_p", utc_tts_set_synthesized_pcm_cb_p, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_synthesized_pcm_cb_n", utc_tts_set_synthesized_pcm_cb_n, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_synthesized_pcm_cb_n1", utc_tts_set_synthesized_pcm_cb_n1, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_synthesized_pcm_cb_n2", utc_tts_set_synthesized_pcm_cb_n2, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_unset_synthesized_pcm_cb_p", utc_tts_unset_synthesized_pcm_cb_p, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_unset_synthesized_pcm_cb_n", utc_tts_unset_synthesized_pcm_cb_n, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_unset_synthesized_pcm_cb_n1", utc_tts_unset_synthesized_pcm_cb_n1, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_playing_mode_p", utc_tts_set_playing_mode_p, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_playing_mode_p1", utc_tts_set_playing_mode_p1, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_playing_mode_n", utc_tts_set_playing_mode_n, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_playing_mode_n1", utc_tts_set_playing_mode_n1, utc_tts_startup, utc_tts_cleanup},
        {"utc_ttse_main_p",utc_ttse_main_p,utc_ttse_startup,utc_ttse_cleanup},
        {"utc_ttse_main_n",utc_ttse_main_n,utc_ttse_startup,utc_ttse_cleanup},
        {"utc_ttse_main_n1",utc_ttse_main_n1,utc_ttse_startup,utc_ttse_cleanup},
index 3d08c7d834799058c2a069c2a0f1f67ae178f0c6..d2b8ba44cd204e39a9ccffd8b09ff0dee36b1170 100755 (executable)
@@ -182,6 +182,17 @@ extern int utc_tts_unset_service_state_changed_cb_p(void);
 extern int utc_tts_unset_service_state_changed_cb_n(void);
 extern int utc_tts_unset_service_state_changed_cb_n2(void);
 extern int utc_tts_unset_service_state_changed_cb_n3(void);
+extern int utc_tts_set_synthesized_pcm_cb_p(void);
+extern int utc_tts_set_synthesized_pcm_cb_n(void);
+extern int utc_tts_set_synthesized_pcm_cb_n1(void);
+extern int utc_tts_set_synthesized_pcm_cb_n2(void);
+extern int utc_tts_unset_synthesized_pcm_cb_p(void);
+extern int utc_tts_unset_synthesized_pcm_cb_n(void);
+extern int utc_tts_unset_synthesized_pcm_cb_n1(void);
+extern int utc_tts_set_playing_mode_p(void);
+extern int utc_tts_set_playing_mode_p1(void);
+extern int utc_tts_set_playing_mode_n(void);
+extern int utc_tts_set_playing_mode_n1(void);
 
 testcase tc_array[] = {
        {"utc_tts_create_p",utc_tts_create_p,utc_tts_startup,utc_tts_cleanup},
@@ -342,6 +353,17 @@ testcase tc_array[] = {
        {"utc_tts_unset_service_state_changed_cb_n",utc_tts_unset_service_state_changed_cb_n,utc_tts_startup,utc_tts_cleanup},
        {"utc_tts_unset_service_state_changed_cb_n2",utc_tts_unset_service_state_changed_cb_n2,utc_tts_startup,utc_tts_cleanup},
        {"utc_tts_unset_service_state_changed_cb_n3",utc_tts_unset_service_state_changed_cb_n3,utc_tts_startup,utc_tts_cleanup},
+       {"utc_tts_set_synthesized_pcm_cb_p", utc_tts_set_synthesized_pcm_cb_p, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_synthesized_pcm_cb_n", utc_tts_set_synthesized_pcm_cb_n, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_synthesized_pcm_cb_n1", utc_tts_set_synthesized_pcm_cb_n1, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_synthesized_pcm_cb_n2", utc_tts_set_synthesized_pcm_cb_n2, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_unset_synthesized_pcm_cb_p", utc_tts_unset_synthesized_pcm_cb_p, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_unset_synthesized_pcm_cb_n", utc_tts_unset_synthesized_pcm_cb_n, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_unset_synthesized_pcm_cb_n1", utc_tts_unset_synthesized_pcm_cb_n1, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_playing_mode_p", utc_tts_set_playing_mode_p, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_playing_mode_p1", utc_tts_set_playing_mode_p1, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_playing_mode_n", utc_tts_set_playing_mode_n, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_playing_mode_n1", utc_tts_set_playing_mode_n1, utc_tts_startup, utc_tts_cleanup},
        {NULL, NULL}
 };
 
index cb673b9bca910f29aba2c498dec60f7347bf10fa..2cc675b3e87109209ff2c4a55027a22762d8c6fe 100755 (executable)
@@ -182,6 +182,17 @@ extern int utc_tts_unset_service_state_changed_cb_p(void);
 extern int utc_tts_unset_service_state_changed_cb_n(void);
 extern int utc_tts_unset_service_state_changed_cb_n2(void);
 extern int utc_tts_unset_service_state_changed_cb_n3(void);
+extern int utc_tts_set_synthesized_pcm_cb_p(void);
+extern int utc_tts_set_synthesized_pcm_cb_n(void);
+extern int utc_tts_set_synthesized_pcm_cb_n1(void);
+extern int utc_tts_set_synthesized_pcm_cb_n2(void);
+extern int utc_tts_unset_synthesized_pcm_cb_p(void);
+extern int utc_tts_unset_synthesized_pcm_cb_n(void);
+extern int utc_tts_unset_synthesized_pcm_cb_n1(void);
+extern int utc_tts_set_playing_mode_p(void);
+extern int utc_tts_set_playing_mode_p1(void);
+extern int utc_tts_set_playing_mode_n(void);
+extern int utc_tts_set_playing_mode_n1(void);
 extern int utc_ttse_main_p(void);
 extern int utc_ttse_main_n(void);
 extern int utc_ttse_terminate_p(void);
@@ -364,6 +375,17 @@ testcase tc_array[] = {
        {"utc_tts_unset_service_state_changed_cb_n",utc_tts_unset_service_state_changed_cb_n,utc_tts_startup,utc_tts_cleanup},
        {"utc_tts_unset_service_state_changed_cb_n2",utc_tts_unset_service_state_changed_cb_n2,utc_tts_startup,utc_tts_cleanup},
        {"utc_tts_unset_service_state_changed_cb_n3",utc_tts_unset_service_state_changed_cb_n3,utc_tts_startup,utc_tts_cleanup},
+       {"utc_tts_set_synthesized_pcm_cb_p", utc_tts_set_synthesized_pcm_cb_p, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_synthesized_pcm_cb_n", utc_tts_set_synthesized_pcm_cb_n, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_synthesized_pcm_cb_n1", utc_tts_set_synthesized_pcm_cb_n1, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_synthesized_pcm_cb_n2", utc_tts_set_synthesized_pcm_cb_n2, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_unset_synthesized_pcm_cb_p", utc_tts_unset_synthesized_pcm_cb_p, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_unset_synthesized_pcm_cb_n", utc_tts_unset_synthesized_pcm_cb_n, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_unset_synthesized_pcm_cb_n1", utc_tts_unset_synthesized_pcm_cb_n1, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_playing_mode_p", utc_tts_set_playing_mode_p, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_playing_mode_p1", utc_tts_set_playing_mode_p1, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_playing_mode_n", utc_tts_set_playing_mode_n, utc_tts_startup, utc_tts_cleanup},
+       {"utc_tts_set_playing_mode_n1", utc_tts_set_playing_mode_n1, utc_tts_startup, utc_tts_cleanup},
        {"utc_ttse_main_p",utc_ttse_main_p,utc_ttse_startup,utc_ttse_cleanup},
        {"utc_ttse_main_n",utc_ttse_main_n,utc_ttse_startup,utc_ttse_cleanup},
        {"utc_ttse_main_n1",utc_ttse_main_n1,utc_ttse_startup,utc_ttse_cleanup},
index 436d5a1f0fc1d07f929d37efe12fb8d7fdab4965..bbab8dd8509d67c80129df7371f89dece566ece8 100755 (executable)
@@ -120,6 +120,10 @@ static void __tts_engine_changed_cb(tts_h tts, const char* engine_id, const char
 {
 }
 
+static void __tts_synthesized_pcm_cb(tts_h tts, int utt_id, tts_synthesized_pcm_event_e event, const char* pcm_data, int pcm_data_size, tts_audio_type_e audio_type, int sample_rate, void *user_data)
+{
+}
+
 static void __tts_service_state_changed_cb(tts_h tts, tts_service_state_e previous, tts_service_state_e current, void* user_data)
 {
        g_current_service_state = current;
@@ -4347,3 +4351,262 @@ int utc_tts_unset_engine_changed_cb_n1(void)
        return 0;
 }
 
+/**
+ * @testcase           utc_tts_set_synthesized_pcm_cb_p
+ * @since_tizen                8.0
+ * @description                Positive UTC for set synthesized pcm callback
+ */
+int utc_tts_set_synthesized_pcm_cb_p(void) {
+       int ret = TTS_ERROR_NONE;
+
+       if (g_supported == false) {
+               ret = tts_set_synthesized_pcm_cb(NULL, __tts_synthesized_pcm_cb, NULL);
+               assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(is_created_hndl, TTS_ERROR_NONE);
+               ret = tts_set_synthesized_pcm_cb(g_tts, __tts_synthesized_pcm_cb, NULL);
+               assert_eq(ret, TTS_ERROR_NONE);
+               ret = tts_unset_synthesized_pcm_cb(g_tts);
+               assert_eq(ret, TTS_ERROR_NONE);
+       }
+       return 0;
+}
+
+/**
+ * @testcase           utc_tts_set_synthesized_pcm_cb_n
+ * @since_tizen                8.0
+ * @description                Negative UTC for set synthesized pcm callback (Invalid handle)
+ */
+int utc_tts_set_synthesized_pcm_cb_n(void) {
+       int ret = TTS_ERROR_NONE;
+
+       if (g_supported == false) {
+               ret = tts_set_synthesized_pcm_cb(NULL, __tts_synthesized_pcm_cb, NULL);
+               assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               ret = tts_set_synthesized_pcm_cb(NULL, __tts_synthesized_pcm_cb, NULL);
+               assert_eq(ret, TTS_ERROR_INVALID_PARAMETER);
+       }
+       return 0;
+}
+
+/**
+ * @testcase           utc_tts_set_synthesized_pcm_cb_n1
+ * @since_tizen                8.0
+ * @description                Negative UTC for set synthesized pcm callback (Invalid parameter)
+ */
+int utc_tts_set_synthesized_pcm_cb_n1(void) {
+       int ret = TTS_ERROR_NONE;
+
+       if (g_supported == false) {
+               ret = tts_set_synthesized_pcm_cb(g_tts, NULL, NULL);
+               assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(is_created_hndl, TTS_ERROR_NONE);
+               ret = tts_set_synthesized_pcm_cb(g_tts, NULL, NULL);
+               assert_eq(ret, TTS_ERROR_INVALID_PARAMETER);
+       }
+       return 0;
+}
+
+/**
+ * @testcase           utc_tts_set_synthesized_pcm_cb_n2
+ * @since_tizen                8.0
+ * @description                Negative UTC for set synthesized pcm callback (Invalid state)
+ */
+ int utc_tts_set_synthesized_pcm_cb_n2(void) {
+       int ret = TTS_ERROR_NONE;
+
+       if (g_supported == false) {
+               ret = tts_set_synthesized_pcm_cb(NULL, __tts_synthesized_pcm_cb, NULL);
+               assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(is_created_hndl, TTS_ERROR_NONE);
+
+               ret = tts_prepare(g_tts);
+               assert_eq(ret, TTS_ERROR_NONE);
+
+               while (TTS_STATE_READY != g_current_state) {
+                       ecore_main_loop_iterate();
+               }
+
+               ret = tts_set_synthesized_pcm_cb(g_tts, __tts_synthesized_pcm_cb, NULL);
+               assert_eq(ret, TTS_ERROR_INVALID_STATE);
+
+               ret = tts_unprepare(g_tts);
+               assert_eq(ret, TTS_ERROR_NONE);
+       }
+}
+
+/**
+ * @testcase           utc_tts_unset_synthesized_pcm_cb_p
+ * @since_tizen                8.0
+ * @description                Positive UTC for unset synthesized pcm callback
+ */
+ int utc_tts_unset_synthesized_pcm_cb_p(void) {
+       int ret = TTS_ERROR_NONE;
+
+       if (g_supported == false) {
+               ret = tts_unset_synthesized_pcm_cb(g_tts);
+               assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(is_created_hndl, TTS_ERROR_NONE);
+               ret = tts_set_synthesized_pcm_cb(g_tts, __tts_synthesized_pcm_cb, NULL);
+               assert_eq(ret, TTS_ERROR_NONE);
+               ret = tts_unset_synthesized_pcm_cb(g_tts);
+               assert_eq(ret, TTS_ERROR_NONE);
+       }
+       return 0;
+}
+
+/**
+ * @testcase           utc_tts_unset_synthesized_pcm_cb_n
+ * @since_tizen                8.0
+ * @description                Negative UTC for unset synthesized pcm callback (Invalid handle)
+ */
+int utc_tts_unset_synthesized_pcm_cb_n(void) {
+       int ret = TTS_ERROR_NONE;
+
+       if (g_supported == false) {
+               ret = tts_unset_synthesized_pcm_cb(NULL);
+               assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               ret = tts_unset_synthesized_pcm_cb(NULL);
+               assert_eq(ret, TTS_ERROR_INVALID_PARAMETER);
+       }
+       return 0;
+}
+
+/**
+ * @testcase           utc_tts_unset_synthesized_pcm_cb_n1
+ * @since_tizen                8.0
+ * @description                Negative UTC for unset synthesized pcm callback (Invalid state)
+ */
+int utc_tts_unset_synthesized_pcm_cb_n1(void) {
+       int ret = TTS_ERROR_NONE;
+
+       if (g_supported == false) {
+               ret = tts_unset_synthesized_pcm_cb(g_tts);
+               assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(is_created_hndl, TTS_ERROR_NONE);
+               ret = tts_set_synthesized_pcm_cb(g_tts, __tts_synthesized_pcm_cb, NULL);
+               assert_eq(ret, TTS_ERROR_NONE);
+
+               ret = tts_prepare(g_tts);
+               assert_eq(ret, TTS_ERROR_NONE);
+
+               while (TTS_STATE_READY != g_current_state) {
+                       ecore_main_loop_iterate();
+               }
+
+               ret = tts_unset_synthesized_pcm_cb(g_tts);
+               assert_eq(ret, TTS_ERROR_INVALID_STATE);
+
+               ret = tts_unprepare(g_tts);
+               assert_eq(ret, TTS_ERROR_NONE);
+       }
+}
+
+/**
+ * @testcase           utc_tts_set_playing_mode_p
+ * @since_tizen                8.0
+ * @description                Positive UTC for set playing mode as by service
+ */
+int utc_tts_set_playing_mode_p(void) {
+       int ret = TTS_ERROR_NONE;
+       tts_playing_mode_e mode = TTS_PLAYING_MODE_BY_SERVICE;
+
+       if (g_supported == false) {
+               ret = tts_set_playing_mode(g_tts, mode);
+               assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(is_created_hndl, TTS_ERROR_NONE);
+               ret = tts_set_playing_mode(g_tts, mode);
+               assert_eq(ret, TTS_ERROR_NONE);
+       }
+       return 0;
+}
+
+/**
+ * @testcase           utc_tts_set_playing_mode_p1
+ * @since_tizen                8.0
+ * @description                Positive UTC for set playing mode as by client
+ */
+ int utc_tts_set_playing_mode_p1(void) {
+       int ret = TTS_ERROR_NONE;
+       tts_playing_mode_e mode = TTS_PLAYING_MODE_BY_CLIENT;
+
+       if (g_supported == false) {
+               ret = tts_set_playing_mode(g_tts, mode);
+               assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(is_created_hndl, TTS_ERROR_NONE);
+               ret = tts_set_playing_mode(g_tts, mode);
+               assert_eq(ret, TTS_ERROR_NONE);
+       }
+       return 0;
+}
+
+/**
+ * @testcase           utc_tts_set_playing_mode_n
+ * @since_tizen                8.0
+ * @description                Negative UTC for set playing mode (Invalid handle)
+ */
+ int utc_tts_set_playing_mode_n(void) {
+       int ret = TTS_ERROR_NONE;
+       tts_playing_mode_e mode = TTS_PLAYING_MODE_BY_CLIENT;
+
+       if (g_supported == false) {
+               ret = tts_set_playing_mode(NULL, mode);
+               assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               ret = tts_set_playing_mode(NULL, mode);
+               assert_eq(ret, TTS_ERROR_INVALID_PARAMETER);
+       }
+       return 0;
+}
+
+/**
+ * @testcase           utc_tts_set_playing_mode_n1
+ * @since_tizen                8.0
+ * @description                Negative UTC for set playing mode (Invalid state)
+ */
+int utc_tts_set_playing_mode_n1(void) {
+       int ret = TTS_ERROR_NONE;
+       tts_playing_mode_e mode = TTS_PLAYING_MODE_BY_CLIENT;
+
+       if (g_supported == false) {
+               ret = tts_set_playing_mode(g_tts, mode);
+               assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(is_created_hndl, TTS_ERROR_NONE);
+               ret = tts_set_playing_mode(g_tts, mode);
+               assert_eq(ret, TTS_ERROR_NONE);
+
+               ret = tts_prepare(g_tts);
+               assert_eq(ret, TTS_ERROR_NONE);
+
+               while (TTS_STATE_READY != g_current_state) {
+                       ecore_main_loop_iterate();
+               }
+
+               ret = tts_set_playing_mode(g_tts, mode);
+               assert_eq(ret, TTS_ERROR_INVALID_STATE);
+
+               ret = tts_unprepare(g_tts);
+               assert_eq(ret, TTS_ERROR_NONE);
+       }
+       return 0;
+}
\ No newline at end of file