Browse Source

Updated tests

Yann Weber 7 years ago
parent
commit
ed5338da15
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      tests/ttail_init_check.c

+ 6
- 6
tests/ttail_init_check.c View File

353
 	char *arg[] = {NULL, NULL};
353
 	char *arg[] = {NULL, NULL};
354
 	struct tm zero;
354
 	struct tm zero;
355
 
355
 
356
-	memset(&zero, 0, sizeof(struct tm));
356
+	memset(&zero, -1, sizeof(struct tm));
357
 
357
 
358
 	ret = ttail_set_dates(ttail, arg);
358
 	ret = ttail_set_dates(ttail, arg);
359
 	ck_assert_int_eq(ret, 0);
359
 	ck_assert_int_eq(ret, 0);
380
 	strcpy(arg0, arg[0]);
380
 	strcpy(arg0, arg[0]);
381
 	arg[0]=arg0;
381
 	arg[0]=arg0;
382
 
382
 
383
-	memset(&zero, 0, sizeof(struct tm));
383
+	memset(&zero, -1, sizeof(struct tm));
384
 
384
 
385
 	ret = ttail_set_dates(ttail, arg);
385
 	ret = ttail_set_dates(ttail, arg);
386
 	ck_assert_int_eq(ret, 0);
386
 	ck_assert_int_eq(ret, 0);
413
 	strcpy(arg1, arg[1]);
413
 	strcpy(arg1, arg[1]);
414
 	arg[1]=arg1;
414
 	arg[1]=arg1;
415
 
415
 
416
-	memset(&zero, 0, sizeof(struct tm));
416
+	memset(&zero, -1, sizeof(struct tm));
417
 
417
 
418
 	ret = ttail_set_dates(ttail, arg);
418
 	ret = ttail_set_dates(ttail, arg);
419
 	ck_assert_int_eq(ret, 0);
419
 	ck_assert_int_eq(ret, 0);
473
 	ck_assert_int_eq(ttail->date_max.tm_year, 188);
473
 	ck_assert_int_eq(ttail->date_max.tm_year, 188);
474
 	ck_assert_int_eq(ttail->date_max.tm_mon, 9);
474
 	ck_assert_int_eq(ttail->date_max.tm_mon, 9);
475
 	ck_assert_int_eq(ttail->date_max.tm_mday, 22);
475
 	ck_assert_int_eq(ttail->date_max.tm_mday, 22);
476
-	ck_assert_int_eq(ttail->date_max.tm_hour, 0);
477
-	ck_assert_int_eq(ttail->date_max.tm_min, 0);
478
-	ck_assert_int_eq(ttail->date_max.tm_sec, 0);
476
+	ck_assert_int_eq(ttail->date_max.tm_hour, -1);
477
+	ck_assert_int_eq(ttail->date_max.tm_min, -1);
478
+	ck_assert_int_eq(ttail->date_max.tm_sec, -1);
479
 }
479
 }
480
 END_TEST
480
 END_TEST
481
 
481
 

Loading…
Cancel
Save