char* pszGetUserText = NULL;
- int nIndex = 0 + (rand()% 5);//The index of the user integer (must be in range from 0 to 4)
- int nRet = account_set_user_text(g_account, nIndex, pszSetUserText);
- PRINT_RESULT(ACCOUNT_ERROR_NONE, nRet, "account_set_user_text", AccManagerGetErrorMSG(nRet));
-
- nRet = account_get_user_text(g_account, nIndex, &pszGetUserText);
- PRINT_RESULT(ACCOUNT_ERROR_NONE, nRet, "account_get_user_text", AccManagerGetErrorMSG(nRet));
- if ( pszGetUserText == NULL || strcmp(pszSetUserText, pszGetUserText) != 0 )
+ //int nIndex = 0 + (rand()% 5);//The index of the user integer (must be in range from 0 to 4)
+ int nIndex=0;
+ for( nIndex= 0;nIndex<5;nIndex++)
{
- FPRINTF("[Line : %d][%s] account_get_user_text API Call Failed Set and Get values mismatchSet value is: %s, Get value is: %s\\n", __LINE__, API_NAMESPACE, pszSetUserText, pszGetUserText);
+ int nRet = account_set_user_text(g_account, nIndex, pszSetUserText);
+ PRINT_RESULT(ACCOUNT_ERROR_NONE, nRet, "account_set_user_text", AccManagerGetErrorMSG(nRet));
+
+ nRet = account_get_user_text(g_account, nIndex, &pszGetUserText);
+ PRINT_RESULT(ACCOUNT_ERROR_NONE, nRet, "account_get_user_text", AccManagerGetErrorMSG(nRet));
+ if ( pszGetUserText == NULL || strcmp(pszSetUserText, pszGetUserText) != 0 )
+ {
+ FPRINTF("[Line : %d][%s] account_get_user_text API Call Failed Set and Get values mismatchSet value is: %s, Get value is: %s\\n", __LINE__, API_NAMESPACE, pszSetUserText, pszGetUserText);
+ FREE_MEMORY(pszGetUserText);
+ return 1;
+ }
FREE_MEMORY(pszGetUserText);
- return 1;
}
- FREE_MEMORY(pszGetUserText);
return 0;
}
return 1;
}
- int nIndex = 0 + (rand()% 5);//The index of the user integer (must be in range from 0 to 4)
- nRet = account_set_user_int(g_account, nIndex, pszSetUserInt);
- PRINT_RESULT_CLEANUP(ACCOUNT_ERROR_NONE, nRet, "account_set_user_int", AccManagerGetErrorMSG(nRet), account_delete_from_db_by_id(g_AccId););
+ //int nIndex = 0 + (rand()% 5);//The index of the user integer (must be in range from 0 to 4)
+ int nIndex=0;
+ for( nIndex= 0;nIndex<5;nIndex++)
+ {
+ nRet = account_set_user_int(g_account, nIndex, pszSetUserInt);
+ PRINT_RESULT_CLEANUP(ACCOUNT_ERROR_NONE, nRet, "account_set_user_int", AccManagerGetErrorMSG(nRet), account_delete_from_db_by_id(g_AccId););
- nRet = account_update_to_db_by_id(g_account, g_AccId);
- PRINT_RESULT_CLEANUP(ACCOUNT_ERROR_NONE, nRet, "account_update_to_db_by_id", AccManagerGetErrorMSG(nRet),account_delete_from_db_by_id(g_AccId););
+ nRet = account_update_to_db_by_id(g_account, g_AccId);
+ PRINT_RESULT_CLEANUP(ACCOUNT_ERROR_NONE, nRet, "account_update_to_db_by_id", AccManagerGetErrorMSG(nRet),account_delete_from_db_by_id(g_AccId););
- nRet = account_get_user_int(g_account, nIndex, &pszGetUserInt);
- PRINT_RESULT_CLEANUP(ACCOUNT_ERROR_NONE, nRet, "account_get_user_int", AccManagerGetErrorMSG(nRet), account_delete_from_db_by_id(g_AccId););
- if ( pszGetUserInt == -1 || pszGetUserInt != pszSetUserInt )
- {
- FPRINTF("[Line : %d][%s] account_get_user_int API Call Failed Set and Get values mismatchSet value is: %d, Get value is: %d\\n", __LINE__, API_NAMESPACE, pszSetUserInt, pszGetUserInt);
- account_delete_from_db_by_id(g_AccId);
- return 1;
+ nRet = account_get_user_int(g_account, nIndex, &pszGetUserInt);
+ PRINT_RESULT_CLEANUP(ACCOUNT_ERROR_NONE, nRet, "account_get_user_int", AccManagerGetErrorMSG(nRet), account_delete_from_db_by_id(g_AccId););
+ if ( pszGetUserInt == -1 || pszGetUserInt != pszSetUserInt )
+ {
+ FPRINTF("[Line : %d][%s] account_get_user_int API Call Failed Set and Get values mismatchSet value is: %d, Get value is: %d\\n", __LINE__, API_NAMESPACE, pszSetUserInt, pszGetUserInt);
+ account_delete_from_db_by_id(g_AccId);
+ return 1;
+ }
}
account_delete_from_db_by_id(g_AccId);
return 0;