Bladeren bron

Updated tests

Yann Weber 7 jaren geleden
bovenliggende
commit
ed5338da15
1 gewijzigde bestanden met toevoegingen van 6 en 6 verwijderingen
  1. 6
    6
      tests/ttail_init_check.c

+ 6
- 6
tests/ttail_init_check.c Bestand weergeven

@@ -353,7 +353,7 @@ START_TEST (test_init_setdates_nothing)
353 353
 	char *arg[] = {NULL, NULL};
354 354
 	struct tm zero;
355 355
 
356
-	memset(&zero, 0, sizeof(struct tm));
356
+	memset(&zero, -1, sizeof(struct tm));
357 357
 
358 358
 	ret = ttail_set_dates(ttail, arg);
359 359
 	ck_assert_int_eq(ret, 0);
@@ -380,7 +380,7 @@ START_TEST (test_init_setdates_nofmt_min)
380 380
 	strcpy(arg0, arg[0]);
381 381
 	arg[0]=arg0;
382 382
 
383
-	memset(&zero, 0, sizeof(struct tm));
383
+	memset(&zero, -1, sizeof(struct tm));
384 384
 
385 385
 	ret = ttail_set_dates(ttail, arg);
386 386
 	ck_assert_int_eq(ret, 0);
@@ -413,7 +413,7 @@ START_TEST (test_init_setdates_nofmt_max)
413 413
 	strcpy(arg1, arg[1]);
414 414
 	arg[1]=arg1;
415 415
 
416
-	memset(&zero, 0, sizeof(struct tm));
416
+	memset(&zero, -1, sizeof(struct tm));
417 417
 
418 418
 	ret = ttail_set_dates(ttail, arg);
419 419
 	ck_assert_int_eq(ret, 0);
@@ -473,9 +473,9 @@ START_TEST (test_init_setdates_nofmt_both)
473 473
 	ck_assert_int_eq(ttail->date_max.tm_year, 188);
474 474
 	ck_assert_int_eq(ttail->date_max.tm_mon, 9);
475 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 480
 END_TEST
481 481
 

Loading…
Annuleren
Opslaan