From: Utkarsh Tiwari Date: Mon, 14 Nov 2022 08:13:40 +0000 (+0530) Subject: [ITC][app-manager][NonACR] Removed build warning and whitespaces X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5432b8eb773fe84fe7503a956252c61d536ab5b7;p=test%2Ftct%2Fnative%2Fapi.git [ITC][app-manager][NonACR] Removed build warning and whitespaces Change-Id: Iab8f47de33119dfe92c0a1d005dffd63a400ec19 Signed-off-by: Utkarsh Tiwari --- diff --git a/src/itc/app-manager/ITs-app-manager.c b/src/itc/app-manager/ITs-app-manager.c index 7947de935..888edad7f 100755 --- a/src/itc/app-manager/ITs-app-manager.c +++ b/src/itc/app-manager/ITs-app-manager.c @@ -155,7 +155,7 @@ void ITs_app_manager_cleanup(void) int ITc_app_manager_request_terminate_bg_app_p(void) { START_TEST; - + int nRet = APP_MANAGER_ERROR_NONE; app_context_h pAppContext; app_control_h hAppControl = NULL; @@ -170,7 +170,7 @@ int ITc_app_manager_request_terminate_bg_app_p(void) nRet = app_control_send_launch_request(hAppControl , NULL , NULL); sleep(1); PRINT_RESULT_CLEANUP(APP_MANAGER_ERROR_NONE, nRet, "app_control_send_launch_request", AppManagerGetError(nRet), app_control_destroy(hAppControl)); - + nRet = app_manager_get_app_context((const char *)TEST_APPMANAGERTESTFILE_APPID , &pAppContext); PRINT_RESULT_CLEANUP(APP_MANAGER_ERROR_NONE, nRet, "app_manager_get_app_context", AppManagerGetError(nRet), app_control_send_terminate_request(hAppControl);app_control_destroy(hAppControl)); if(NULL == pAppContext) @@ -180,17 +180,17 @@ int ITc_app_manager_request_terminate_bg_app_p(void) app_control_destroy(hAppControl); return 1; } - + nRet = app_control_send_terminate_request(hAppControl); sleep(1); PRINT_RESULT_CLEANUP(APP_MANAGER_ERROR_NONE, nRet, "app_control_send_terminate_request", AppManagerGetError(nRet), app_control_destroy(hAppControl)); - + nRet = app_manager_request_terminate_bg_app(pAppContext); PRINT_RESULT_CLEANUP(APP_MANAGER_ERROR_NONE, nRet, "app_manager_request_terminate_bg_app", AppManagerGetError(nRet), app_control_destroy(hAppControl)); nRet = app_control_destroy(hAppControl); PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_control_destroy", AppManagerGetError(nRet)); - + return 0; } @@ -440,7 +440,7 @@ int ITc_app_manager_get_app_id_p(void) return 1; } - FREE_MEMORY(pszAppID); + FREE_MEMORY(pszAppID); nRet = app_context_destroy(pstAppContext); PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_context_destroy", AppManagerGetError(nRet)); return 0; @@ -567,7 +567,7 @@ int ITc_app_manager_resume_app_p(void) return 1; } - nRet = app_manager_resume_app(pstOpenAppContext); + nRet = app_manager_resume_app(pstOpenAppContext); if ( nRet != APP_MANAGER_ERROR_NONE ) { FPRINTF("[Line : %d][%s] app_manager_resume_app error returned = %s\\n", __LINE__, API_NAMESPACE, AppManagerGetError(nRet)); @@ -640,8 +640,8 @@ int ITc_app_manager_get_shared_resource_path_p(void) int nRet = app_manager_get_shared_resource_path((const char *)TEST_TESTAPPLICATION_APPID, &pszSharePath); PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_get_shared_resource_path", AppManagerGetError(nRet)); - CHECK_VALUE_STRING(pszSharePath, "app_manager_get_shared_resource_path"); - FREE_MEMORY(pszSharePath); + CHECK_VALUE_STRING(pszSharePath, "app_manager_get_shared_resource_path"); + FREE_MEMORY(pszSharePath); return 0; } @@ -671,8 +671,8 @@ int ITc_app_manager_get_shared_trusted_path_p(void) // Target API int nRet = app_manager_get_shared_trusted_path((const char *)TEST_TESTAPPLICATION_APPID, &pszSharePath); PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_get_shared_trusted_path", AppManagerGetError(nRet)); - CHECK_VALUE_STRING(pszSharePath, "app_manager_get_shared_trusted_path"); - FREE_MEMORY(pszSharePath); + CHECK_VALUE_STRING(pszSharePath, "app_manager_get_shared_trusted_path"); + FREE_MEMORY(pszSharePath); return 0; } @@ -703,8 +703,8 @@ int ITc_app_manager_get_shared_data_path_p(void) // Target API int nRet = app_manager_get_shared_data_path((const char *)TEST_TESTAPPLICATION_APPID, &pszSharePath); PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_get_shared_data_path", AppManagerGetError(nRet)); - CHECK_VALUE_STRING(pszSharePath, "app_manager_get_shared_data_path"); - FREE_MEMORY(pszSharePath); + CHECK_VALUE_STRING(pszSharePath, "app_manager_get_shared_data_path"); + FREE_MEMORY(pszSharePath); return 0; } @@ -732,9 +732,9 @@ int ITc_app_manager_get_external_shared_data_path_p(void) char *pszSharePath = NULL; int nRet = app_manager_get_external_shared_data_path((const char *)TEST_TESTAPPLICATION_APPID, &pszSharePath); - PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_get_external_shared_data_path", AppManagerGetError(nRet)); - CHECK_VALUE_STRING(pszSharePath, "app_manager_get_external_shared_data_path"); - FREE_MEMORY(pszSharePath); + PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_get_external_shared_data_path", AppManagerGetError(nRet)); + CHECK_VALUE_STRING(pszSharePath, "app_manager_get_external_shared_data_path"); + FREE_MEMORY(pszSharePath); return 0; } @@ -761,13 +761,13 @@ int ITc_app_manager_event_create_destroy_p(void) app_manager_event_h hEventHandle = NULL; - int nRet = app_manager_event_create(&hEventHandle); - PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_create", AppManagerGetError(nRet)); + int nRet = app_manager_event_create(&hEventHandle); + PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_create", AppManagerGetError(nRet)); CHECK_HANDLE(hEventHandle, "app_manager_event_create"); - + nRet = app_manager_event_destroy(hEventHandle); PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_destroy", AppManagerGetError(nRet)); - + return 0; } //& type: auto @@ -792,9 +792,9 @@ int ITc_app_manager_event_set_status_p(void) { START_TEST; - app_manager_event_h hEventHandle = NULL; + app_manager_event_h hEventHandle = NULL; int nEnumStartCount; - + int nStatusOption[] = { APP_MANAGER_EVENT_STATUS_TYPE_ALL , APP_MANAGER_EVENT_STATUS_TYPE_ENABLE, @@ -802,22 +802,22 @@ int ITc_app_manager_event_set_status_p(void) }; int nStatusOptionCount = sizeof(nStatusOption) / sizeof(nStatusOption[0]); - int nRet = app_manager_event_create(&hEventHandle); - PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_create", AppManagerGetError(nRet)); + int nRet = app_manager_event_create(&hEventHandle); + PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_create", AppManagerGetError(nRet)); CHECK_HANDLE(hEventHandle, "app_manager_event_create"); - + for(nEnumStartCount = 0 ; nEnumStartCount < nStatusOptionCount ; nEnumStartCount++ ) - { + { FPRINTF("Status = [%s] \\n" ,AppManagerGetStaus(nStatusOption[nEnumStartCount])); //Target API - nRet = app_manager_event_set_status(hEventHandle,nStatusOption[nEnumStartCount]); + nRet = app_manager_event_set_status(hEventHandle,nStatusOption[nEnumStartCount]); PRINT_RESULT_CLEANUP(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_set_status", AppManagerGetError(nRet), app_manager_event_destroy(hEventHandle)); } - + nRet = app_manager_event_destroy(hEventHandle); - PRINT_RESULT_NORETURN(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_destroy", AppManagerGetError(nRet)); - + PRINT_RESULT_NORETURN(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_destroy", AppManagerGetError(nRet)); + return 0; } @@ -843,20 +843,19 @@ int ITc_app_manager_event_set_status_p(void) int ITc_app_manager_set_unset_event_cb_p(void) { START_TEST; - int nTimeoutId = 0; app_manager_event_h hEventHandle = NULL; g_bAppManagerCallback = false; - int nRet = app_manager_event_create(&hEventHandle); - PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_create", AppManagerGetError(nRet)); + int nRet = app_manager_event_create(&hEventHandle); + PRINT_RESULT(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_create", AppManagerGetError(nRet)); CHECK_HANDLE(hEventHandle, "app_manager_event_create"); //Target API nRet = app_manager_set_event_cb(hEventHandle,AppManagerEventCallback,NULL); PRINT_RESULT_CLEANUP(APP_MANAGER_ERROR_NONE, nRet, "app_manager_set_event_cb", AppManagerGetError(nRet), app_manager_event_destroy(hEventHandle)); - + //Callback hit is not checked as there is no way or such APIs to check invocation of callback registered - discussed with developer - + /*RUN_POLLING_LOOP; if ( g_bAppManagerCallback == false ) { @@ -867,10 +866,10 @@ int ITc_app_manager_set_unset_event_cb_p(void) //Target API nRet = app_manager_unset_event_cb(hEventHandle); PRINT_RESULT_CLEANUP(APP_MANAGER_ERROR_NONE, nRet, "app_manager_unset_event_cb", AppManagerGetError(nRet), app_manager_event_destroy(hEventHandle)); - + nRet = app_manager_event_destroy(hEventHandle); - PRINT_RESULT_NORETURN(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_destroy", AppManagerGetError(nRet)); - + PRINT_RESULT_NORETURN(APP_MANAGER_ERROR_NONE, nRet, "app_manager_event_destroy", AppManagerGetError(nRet)); + return 0; }