From: Shilpa Jindal Date: Tue, 20 Dec 2016 05:56:59 +0000 (+0530) Subject: [ITC][calendar-sevice2][Non-ACR][TSAM-11744,11750,fixed the failed test cases for... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b6c49d887f9de514d9fe7e5519f535ccb854e5bd;p=test%2Ftct%2Fnative%2Fapi.git [ITC][calendar-sevice2][Non-ACR][TSAM-11744,11750,fixed the failed test cases for module] Change-Id: I972645a7befd81215c5cf30858d79287ddd4bad0 Signed-off-by: Shilpa Jindal --- diff --git a/src/itc/calendar-service2/ITs-calendar-service2-common.c b/src/itc/calendar-service2/ITs-calendar-service2-common.c index a4b29c79e..676b3e045 100755 --- a/src/itc/calendar-service2/ITs-calendar-service2-common.c +++ b/src/itc/calendar-service2/ITs-calendar-service2-common.c @@ -282,4 +282,16 @@ gboolean Timeout_Function(gpointer data) return false; } +time_t get_utime(int y, int m, int d, int h, int n, int s) +{ + struct tm st = {0}; + st.tm_year = y - 1900; + st.tm_mon = m - 1; + st.tm_mday = d; + st.tm_hour = h; + st.tm_min = n; + st.tm_sec = s; + return mktime(&st); +} + /** @} */ diff --git a/src/itc/calendar-service2/ITs-calendar-service2-common.h b/src/itc/calendar-service2/ITs-calendar-service2-common.h index 18c657f26..f5b538925 100755 --- a/src/itc/calendar-service2/ITs-calendar-service2-common.h +++ b/src/itc/calendar-service2/ITs-calendar-service2-common.h @@ -71,6 +71,7 @@ char* CalendarFilterOperator(int nRet); void GetViewURIforDB(char szArr[MAX_ROW][MAX_COL]); void GetViewURIforDBByVersion(char szArr[MAX_ROW][MAX_COL]); gboolean Timeout_Function(gpointer data); +time_t get_utime(int y, int m, int d, int h, int n, int s); /** @} */ #endif //_ITS_CALENDAR_SERVICE2_COMMON_H_ diff --git a/src/itc/calendar-service2/ITs-calendar-service2-database.c b/src/itc/calendar-service2/ITs-calendar-service2-database.c index 76306f9b2..afd998230 100755 --- a/src/itc/calendar-service2/ITs-calendar-service2-database.c +++ b/src/itc/calendar-service2/ITs-calendar-service2-database.c @@ -281,28 +281,39 @@ int ITc_calendar_db_get_all_records_p(void) { START_TEST; - int nRetVal = -1, nURICount = 0; + int nRetVal = -1, nURICount = 1;//set to 1 for _calendar_event._uri calendar_list_h list = NULL; int nOffset = 0; int nLimit = 2; - char szURI[MAX_ROW][MAX_COL]; GetViewURIforDB(szURI); - int nTotalURICount = URI_COUNT_FOR_DB; - - for ( nURICount = 0; nURICount