[ITC][notification][Non-ACR][Update Set Multi language content API] 99/217199/2
authorPriya Kohli <priya.kohli@samsung.com>
Thu, 7 Nov 2019 10:04:41 +0000 (15:34 +0530)
committershobhit verma <shobhit.v@samsung.com>
Thu, 7 Nov 2019 11:33:17 +0000 (11:33 +0000)
Change-Id: Ice91ed4ccd6284c3c29325cb50d0db85cb7d98cd
Signed-off-by: Priya Kohli <priya.kohli@samsung.com>
src/itc/notification/ITs-notification-ex.c

index 4024ad252541a564b0038b329398af2423b96a83..a1d82d52539fe9e5f7ba7151e526ba3f8f1a891e 100755 (executable)
@@ -6499,24 +6499,23 @@ int ITc_noti_ex_item_input_selector_set_multi_language_contents_p(void)
        nRet = noti_ex_item_input_selector_set_multi_language_contents(hItemInputSel, hMultiLangARR, nLoopSize);
        PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_input_selector_set_multi_language_contents", NotificationExGetError(nRet), noti_ex_item_destroy(hItemInputSel); FREE_MEMORY(hMultiLangARR));
 
-       for (nLoopCounter = 0; nLoopCounter < nCnt; nLoopCounter++)
-       {
-               nRet = noti_ex_multi_lang_destroy(hMultiLangARR[nLoopCounter]);
-               PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_multi_lang_destroy", NotificationExGetError(nRet));
-               FREE_MEMORY(hMultiLangARR[nLoopCounter]);
-       }
-       FREE_MEMORY(hMultiLangARR);
-
        nRet = noti_ex_item_input_selector_get_contents(hItemInputSel, &hOutMultiLangARR, &nCnt);
        PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_input_selector_get_contents", NotificationExGetError(nRet), noti_ex_item_destroy(hItemInputSel));
        PRINT_RESULT_CLEANUP(3, nCnt, "noti_ex_item_input_selector_get_contents", "Return count is not same as set count", noti_ex_item_destroy(hItemInputSel); FREE_MEMORY(hOutMultiLangARR));
 
-       for (int nLoopCounter = 0; nLoopCounter < nCnt; nLoopCounter++)
+       for (nLoopCounter = 0; nLoopCounter < nLoopSize; nLoopCounter++)
        {
                snprintf(ARRBuf, sizeof(ARRBuf), "test string(test) integer(%d) float(0.77)", nLoopCounter);
                PRINT_RESULT_CLEANUP(0, strcmp(hOutMultiLangARR[nLoopCounter], ARRBuf), "noti_ex_multi_lang_create", NotificationExGetError(nRet), noti_ex_item_destroy(hItemInputSel); FREE_MEMORY(hOutMultiLangARR));
        }
 
+       for (nLoopCounter = 0; nLoopCounter < nLoopSize; nLoopCounter++)
+       {
+               nRet = noti_ex_multi_lang_destroy(hMultiLangARR[nLoopCounter]);
+               PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_multi_lang_destroy", NotificationExGetError(nRet));
+               FREE_MEMORY(hOutMultiLangARR[nLoopCounter]);
+       }
+
        FREE_MEMORY(hOutMultiLangARR);
 
        nRet = noti_ex_item_destroy(hItemInputSel);