return 1;
}
- if ( strncmp(pszGetID, g_pszButtonID, sizeof(g_pszButtonID)-1) )
+ if ( strncmp(pszGetID, g_pszButtonID, strlen(g_pszButtonID) + 1) )
{
FPRINTF("[Line : %d][%s] Chiled id [%s] but recieved id is [%s] \\n", __LINE__, API_NAMESPACE, g_pszButtonID, pszGetID);
return 1;
{
START_TEST;
- int nRet = NOTI_EX_ERROR_NONE;
- noti_ex_action_h hAction = NULL;
- const char* pszSetExtra = "test";
- char* pszGetExtra = NULL;
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ noti_ex_action_h hAction = NULL;
+ const char* pszSetExtra = "test";
+ char* pszGetExtra = NULL;
nRet = noti_ex_action_visibility_create(&hAction, pszSetExtra);
PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_visibility_create", NotificationExGetError(nRet));
PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_get_extra", NotificationExGetError(nRet), noti_ex_action_destroy(hAction));
CHECK_HANDLE_CLEANUP(pszGetExtra, "noti_ex_action_get_extra", noti_ex_action_destroy(hAction));
- if (strncmp(pszSetExtra, pszGetExtra, sizeof(pszGetExtra)-1))
+ if (strncmp(pszSetExtra, pszGetExtra, strlen(pszGetExtra) + 1))
{
FPRINTF("[Line : %d][%s] noti_ex_action_get_extra: return extra string is different from set extra [%s]\\n", __LINE__, API_NAMESPACE, pszGetExtra);
PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_get_title", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
CHECK_HANDLE_CLEANUP(pszGetTitle, "noti_ex_item_button_get_title", noti_ex_item_destroy(g_hItemButton));
- if (strncmp(g_pszButtonTitle, pszGetTitle, sizeof(pszGetTitle)-1))
+ if (strncmp(g_pszButtonTitle, pszGetTitle, strlen(pszGetTitle) + 1))
{
FPRINTF("[Line : %d][%s] noti_ex_item_button_get_title: return title is different from set title [%s]\\n", __LINE__, API_NAMESPACE, pszGetTitle);
FREE_MEMORY(pszGetTitle);
PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_text_get_contents", NotificationExGetError(nRet), DestroyChatMsgAttributes());
CHECK_HANDLE_CLEANUP(pszGetChatName, "noti_ex_item_text_get_contents", DestroyChatMsgAttributes());
- if( strncmp(g_pszNameText, pszGetChatName, sizeof(pszGetChatName)-1) )
+ if( strncmp(g_pszNameText, pszGetChatName, strlen(pszGetChatName) + 1) )
{
FPRINTF("[Line : %d][%s] noti_ex_item_chat_message_get_name: return name is different from set name [%s]\\n", __LINE__, API_NAMESPACE, pszGetChatName);
FREE_MEMORY(pszGetChatName);
PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_text_get_contents", NotificationExGetError(nRet), DestroyChatMsgAttributes());
CHECK_HANDLE_CLEANUP(pszGetChatText, "noti_ex_item_text_get_contents", DestroyChatMsgAttributes());
- if( strncmp(g_pszTextText, pszGetChatText, sizeof(pszGetChatText)-1) )
+ if( strncmp(g_pszTextText, pszGetChatText, strlen(pszGetChatText) + 1) )
{
FPRINTF("[Line : %d][%s] noti_ex_item_chat_message_get_text: return chat message text is different from set chat message text [%s]\\n", __LINE__, API_NAMESPACE, pszGetChatText);
FREE_MEMORY(pszGetChatText);
PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_image_get_image_path", NotificationExGetError(nRet), DestroyChatMsgAttributes());
CHECK_HANDLE_CLEANUP(pszGetImagePath, "noti_ex_item_image_get_image_path", DestroyChatMsgAttributes());
- if( strncmp(g_pszImagePath, pszGetImagePath, sizeof(pszGetImagePath)-1) )
+ if( strncmp(g_pszImagePath, pszGetImagePath, strlen(pszGetImagePath) + 1) )
{
FPRINTF("[Line : %d][%s] noti_ex_item_chat_message_get_image: return image path is different from set image path [%s]\\n", __LINE__, API_NAMESPACE, pszGetImagePath);
FREE_MEMORY(pszGetImagePath);
PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_checkbox_get_title", NotificationExGetError(nRet), noti_ex_item_destroy(hItemCheckBox));
CHECK_HANDLE_CLEANUP(pszGetCheckBoxTitle, "noti_ex_item_checkbox_get_title", noti_ex_item_destroy(hItemCheckBox));
- if( strncmp(pszGetCheckBoxTitle, pszCheckBoxTitle, sizeof(pszCheckBoxTitle)-1) )
+ if( strncmp(pszGetCheckBoxTitle, pszCheckBoxTitle, strlen(pszCheckBoxTitle) + 1) )
{
FPRINTF("[Line : %d][%s] noti_ex_item_checkbox_get_title: return checkbox title is different from set checkbox title [%s]\\n", __LINE__, API_NAMESPACE, pszGetCheckBoxTitle);
FREE_MEMORY(pszGetCheckBoxTitle);
PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_entry_get_text", NotificationExGetError(nRet), noti_ex_item_destroy(hItemEntry));
CHECK_HANDLE_CLEANUP(pszEntryGetText, "noti_ex_item_entry_get_text", noti_ex_item_destroy(hItemEntry));
- if( strncmp(pszEntryText, pszEntryGetText, sizeof(pszEntryGetText)-1) )
+ if( strncmp(pszEntryText, pszEntryGetText, strlen(pszEntryGetText) + 1) )
{
FPRINTF("[Line : %d][%s] noti_ex_item_entry_get_text: return entry text is different from set entry text [%s]\\n", __LINE__, API_NAMESPACE, pszEntryGetText);
FREE_MEMORY(pszEntryGetText);
PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_image_get_image_path", NotificationExGetError(nRet), noti_ex_item_destroy(hItemImage));
CHECK_HANDLE_CLEANUP(pszGetImagePath, "noti_ex_item_image_get_image_path", noti_ex_item_destroy(hItemImage));
- if( strncmp(pszImagePath, pszGetImagePath, sizeof(pszGetImagePath)-1) )
+ if( strncmp(pszImagePath, pszGetImagePath, strlen(pszGetImagePath) + 1) )
{
FPRINTF("[Line : %d][%s] noti_ex_item_image_get_image_path: return image path is different from set image path [%s]\\n", __LINE__, API_NAMESPACE, pszGetImagePath);
FREE_MEMORY(pszGetImagePath);
PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_id", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton); FREE_MEMORY(pszGetFindItemID););
CHECK_HANDLE_CLEANUP(pszGetButtonItemID, "noti_ex_item_get_id", noti_ex_item_destroy(hItemGroup); noti_ex_item_destroy(g_hItemButton));
- if( strncmp(pszGetButtonItemID, pszGetFindItemID, sizeof(pszGetFindItemID)-1) )
+ if( strncmp(pszGetButtonItemID, pszGetFindItemID, strlen(pszGetFindItemID) + 1) )
{
FPRINTF("[Line : %d][%s] noti_ex_item_find_by_id: return item ID is different from set item ID [%s]\\n", __LINE__, API_NAMESPACE, pszGetFindItemID);
FREE_MEMORY(pszGetFindItemID);
PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_id", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
CHECK_HANDLE_CLEANUP(pszGetItemID, "noti_ex_item_get_id", noti_ex_item_destroy(g_hItemButton));
- if( strncmp(pszSetItemID, pszGetItemID, sizeof(pszGetItemID)-1) )
+ if( strncmp(pszSetItemID, pszGetItemID, strlen(pszGetItemID) + 1) )
{
FPRINTF("[Line : %d][%s] noti_ex_item_get_id: return item ID is different from set item ID [%s]\\n", __LINE__, API_NAMESPACE, pszGetItemID);
FREE_MEMORY(pszGetItemID);
PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_channel", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
CHECK_HANDLE_CLEANUP(pszGetChannel, "noti_ex_item_get_channel", noti_ex_item_destroy(g_hItemButton));
- if( strncmp(pszSetChannel, pszGetChannel, sizeof(pszGetChannel)-1) )
+ if( strncmp(pszSetChannel, pszGetChannel, strlen(pszGetChannel) + 1) )
{
FPRINTF("[Line : %d][%s] noti_ex_item_get_channel: return Channel is different from set Channel [%s]\\n", __LINE__, API_NAMESPACE, pszGetChannel);
FREE_MEMORY(pszGetChannel);
PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_sound_path", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
CHECK_HANDLE_CLEANUP(pszGetSoundPath, "noti_ex_item_get_sound_path", noti_ex_item_destroy(g_hItemButton));
- if( strncmp(pszSetSoundPath, pszGetSoundPath, sizeof(pszGetSoundPath)-1) )
+ if( strncmp(pszSetSoundPath, pszGetSoundPath, strlen(pszGetSoundPath) + 1) )
{
FPRINTF("[Line : %d][%s] noti_ex_item_get_sound_path: return Sound Path is different from set Sound Path [%s]\\n", __LINE__, API_NAMESPACE, pszGetSoundPath);
FREE_MEMORY(pszGetSoundPath);
PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_vibration_path", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
CHECK_HANDLE_CLEANUP(pszGetVibPath, "noti_ex_item_get_vibration_path", noti_ex_item_destroy(g_hItemButton));
- if( strncmp(pszSetVibPath, pszGetVibPath, sizeof(pszGetVibPath)-1) )
+ if( strncmp(pszSetVibPath, pszGetVibPath, strlen(pszGetVibPath) + 1) )
{
FPRINTF("[Line : %d][%s] noti_ex_item_get_vibration_path: return vibration Path is different from set vibration Path [%s]\\n", __LINE__, API_NAMESPACE, pszGetVibPath);
FREE_MEMORY(pszGetVibPath);
PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_tag", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
CHECK_HANDLE_CLEANUP(pszGetTag, "noti_ex_item_get_tag", noti_ex_item_destroy(g_hItemButton));
- if( strncmp(pszSetTag, pszGetTag, sizeof(pszGetTag)-1) )
+ if( strncmp(pszSetTag, pszGetTag, strlen(pszGetTag) + 1) )
{
FPRINTF("[Line : %d][%s] noti_ex_item_get_tag: return Tag is different from set Tag [%s]\\n", __LINE__, API_NAMESPACE, pszGetTag);
FREE_MEMORY(pszGetTag);
PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_text_get_contents", NotificationExGetError(nRet), noti_ex_item_destroy(hItemText));
CHECK_HANDLE_CLEANUP(pszGetContents, "noti_ex_item_text_get_contents", noti_ex_item_destroy(hItemText));
- if( strncmp(pszSetContents, pszGetContents, sizeof(pszGetContents)-1) )
+ if( strncmp(pszSetContents, pszGetContents, strlen(pszGetContents) + 1) )
{
FPRINTF("[Line : %d][%s] noti_ex_item_text_get_contents: return content is different from set content [%s]\\n", __LINE__, API_NAMESPACE, pszGetContents);
FREE_MEMORY(pszGetContents);
PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_text_get_hyperlink", NotificationExGetError(nRet), noti_ex_item_destroy(hItemText));
CHECK_HANDLE_CLEANUP(pszGetHyperLink, "noti_ex_item_text_get_hyperlink", noti_ex_item_destroy(hItemText));
- if( strncmp(pszTextHyperLink, pszGetHyperLink, sizeof(pszGetHyperLink)-1) )
+ if( strncmp(pszTextHyperLink, pszGetHyperLink, strlen(pszGetHyperLink) + 1) )
{
FPRINTF("[Line : %d][%s] noti_ex_item_text_get_hyperlink: return hyperlink is different from set hyperlink [%s]\\n", __LINE__, API_NAMESPACE, pszGetHyperLink);
FREE_MEMORY(pszGetHyperLink);
PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_style_get_background_image", NotificationExGetError(nRet), DestroyStyleAttributes(); FREE_MEMORY(pszResPath));
CHECK_HANDLE_CLEANUP(pszGetImagePath, "noti_ex_style_get_background_image", DestroyStyleAttributes(); FREE_MEMORY(pszResPath));
- if( strncmp(pszSetImagePath, pszGetImagePath, sizeof(pszGetImagePath)-1) )
+ if( strncmp(pszSetImagePath, pszGetImagePath, strlen(pszGetImagePath) + 1) )
{
FPRINTF("[Line : %d][%s] noti_ex_style_get_background_image: return image Path [%s] is different from set image Path [%s]\\n", __LINE__, API_NAMESPACE, pszGetImagePath, pszSetImagePath);
DestroyStyleAttributes();